[Merged into this thread -- MOD]
I am just starting out with PHP. I have resorted to doing some custom PHP programming because the plug-INs for a CMS I am using need a little customization.
The question I have is very simple and I am sure PHP programmers can answer this instantly. I have successfully declared a global PHP variable. All I need to know how to do for now is how to declare a button or a hyperlink or an input form element such that it can change the assignment of this variable.
I have tried the following suggestion. In the html code I have this:
<form method="post">
<input type="text" name="textbox1"/>
<input type="submit" value="Click me!"/>
</form>
Then I am supposed to be able to grab the input of the textbox like by using the following php code:
<?php
$variable = $_POST['textbox1'];
?>
But where would I put this php code? I have tried to do this prior to the form declaration and I have tried after the form decoaration in the php file. Both do not seem to work because prior to the page being submitted, it does not exist inthe context of the page.