PDA


View Full Version : PHP page with FORM tag - need help


croupier
09-03-2005, 10:28 AM
I've tried all sort to get this working but i'm stumped. All I want to do is setup a PHP page with a form which passes the form data back to itself

eg.


<?
echo "*".$test."*";
?>
<form action="" method="get" name="form1">
<input type="hidden" name="page" value="formtest">
<input type="text" name="test">
<input type="submit" value="submit" name="submit">
</form>


I think it must be something to do with the globals but I've tried all sorts and can't get it to work (the page variable is working fine but I can't get hold of the test variable, although it's showing in the URL)

Help!

Brian
09-03-2005, 04:44 PM
Are you using $_POST['test'] in the file after the form is posted?

croupier
09-03-2005, 07:08 PM
I've tried that (and other superglobals) but it didn't work :(

croupier
09-08-2005, 08:29 AM
Does nobody have any idea why $_REQUEST doesn't work within a php file page???