I'll start with a simple one.
I am experiencing the following problem:
I was reading that PHP comes with special variables called super global variables. One such example of these variables is the
$_GET variable inside of which is an array that contains all the parameters that came from a form on the web.
My goal is to print to the screen, the content of the variable that the browser is sending to the server on my form.
This should be simple but it is not working:
my action.html page looks like this
Language: HTML
<form action="action.php" method="get">
Amount<input type="text" name="q" />
<input type="button" value="Show" />
</form>
Note the form="action.php" I want the form to send the value to action.php file which is in the root directory of my server
My action.php code looks like this
Language: PHP
<?PHP
print_r($_GET[';q';]);
?>
Now what I should get back (according to my understanding )is when user clicks button 'show' the value entered into the text field should open in the action.php page
The problem im facing is NOTHING is happening when user clicks the button.... I'm stumped!
Any help or suggestions would be welcomed