FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » checkbox and reload a page
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
checkbox and reload a page [message #170851] Fri, 03 December 2010 11:36 Go to previous message
anver is currently offline  anver
Messages: 5
Registered: November 2010
Karma:
Junior Member
a page with a checkbox and code:
in short

function A () {
checkbox (default off)
check off if {.. code ..)
}

problem:
when the page is loaded, is applied the ..code..;
I would like to click on the check and not apply the ..code..;
so is necessary to reload the page and maintain the value of the check
selected (notice this is a form similar at a form for to create own
account, so the state of checkbox cannot achivied in way permanent in the
db or in a php's variable, but used on the fly)


same code but using a variable

var_A = true;
function A () {
checkbox
if var_A {.. code ..)
}




------
more info



is similar to a normal registration user form with this difference:

generally in these forms, user active checkbox and after with send's button
the php passing its datas to another page;
in my case instead, the whole page is already pre-loaded and the same datas
aree send at a report's page for print;
so checkbox is used for reloading the same page but removing something
variables (with ..code.. that is an unset command)

(this isn't correct but is an attempt to change resuolts without having to
change the original code)


so the variable var_A, should be seen and used only locally,
because each user will opt for their choice


I think that php variable var_A should be relative only at that user while
use the form (cookies, sessions or others)
or integrated with a variable Javascript


how is possible to resolve?
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Evaluating an expression
Next Topic: comp.lang.php
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 17:30:07 GMT 2024

Total time taken to generate the page: 0.05301 seconds