changing of value help

hello guys i am a student and im newbie in php.

im working on my case study now and im wondering how to change the value of an variable when the user submits the button, but the button and the variable i want to change are in different page.

example im the user, when i didnt click the button yet the value of the variable is false, but when i click the button it turns true.

guys can u give me the code and explain how did you came with that. thanks, your replies will be appreciated.

We need to see the code you are trying to use. We HELP people here, we don’t do projects for them. Try first and if you need help then provide the code you are having issues with.

Well, to detect a button push using php, you first need to give the button a name so it has something to post, set the form method to post and then do something
[php]if(isset($_POST[‘buttonname’])) {
// code
}[/php] The code inside there should only execute once the button is pushed.

To change the value of a variable using a form, you’d just do something like:
$var = $_POST[‘textboxname’];

Whatever $var used to contain now holds the value of the text input.

Sponsor our Newsletter | Privacy Policy | Terms of Service