Form "POST" not passing on
Enverex
Worcester, UK Icrontian
Trying to get a form to pass some data on, but its just not working.
Apparently the name of the entry box becomes the variable the value is stored in when the form gets passed on, but it doesnt seem to be working......
Form -
[PHP]<form method="post" action="searcher.php">
<input type="text" name="GN">
<input type="reset" value="Clear">
<input type="submit" value="Find Game">
</form>[/PHP]
Passed on to -
[PHP]<?php
echo $GN;
?>[/PHP]
Just does -
Any ideas? As there is no reason that this shouldnt be working afaikt, as I have looked up about 500 examples now....
NS
Apparently the name of the entry box becomes the variable the value is stored in when the form gets passed on, but it doesnt seem to be working......
Form -
[PHP]<form method="post" action="searcher.php">
<input type="text" name="GN">
<input type="reset" value="Clear">
<input type="submit" value="Find Game">
</form>[/PHP]
Passed on to -
[PHP]<?php
echo $GN;
?>[/PHP]
Just does -
<b>Notice</b>: Undefined variable: GN in <b>C:\http\ac\amiga\searcher.php</b> on line <b>2</b>
Any ideas? As there is no reason that this shouldnt be working afaikt, as I have looked up about 500 examples now....
NS
0
Comments
< input type="text" name="GN" value="" >
value="cheese"
in the text box then when the page loads, it will just say "Cheese".
NS
[php]<?php
$GN = $_POST;
echo $GN;
?>
[/php]
The basic info came from php.net tutorial.
I just started messing with php a few days ago so there may be a better solution.
So cheers for clearing that up. Yeah, globals is staying off.
Oh, read the bottom server message - http://atomnet.co.uk/pagethatdoesntahja
NS
http://atomnet.co.uk/amiga/?p=engine&module=search
Enter 'world' or 'cannon' or something
Cheers all,
NS