Form Problem

From: Date: Wed, 09 Jan 2002 19:30:12 +0000
Subject: Form Problem
Groups: php.general 
Request: Send a blank email to php-general+get-79946@lists.php.net to get a copy of this message
I'm having a problem with a HTML form. When it gets submitted, I keep getting an undefined variable error message. And a blank page (aside from a 'Hi' written on it...). I don't think its a problem with my install of PHP as other PHP code is running fine, but can't get it to print out this name. I'm probably missing something simple, but I just can't figure it out. Any help would be appreciated. the form: <html> <head> <title>My Form</title> </head> <body> <form action="test2.php" method="GET"> My name is: <br> <input type="text" name="YourName"> <input type="submit" name="submit" value="Submit" /> </form> </body> </html> Test2.php file: <html> <head> <title>Form test...</title> </head> <body> Hi <?php echo "$YourName"; ?> </body> </html> The url that is getting passed to the file: http://localhost/test2.php?YourName=Chris&submit=Submit The error message I'm getting: [Wed Jan 09 14:24:47 2002] [error] [client 127.0.0.1] PHP Warning: Undefined variable: YourName in c:\program files\apache group\apache\htdocs\test2.php on line 10

« previous php.general (#79946) next »