Re: Can any body help? Thanks.
| From: | Juan Pablo Aqueveque | Date: | Sat, 24 Aug 2002 12:53:26 +0000 |
| Subject: | Re: Can any body help? Thanks. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-113966@lists.php.net to get a copy of this message | ||
Try this:
if ($_POST["submit"] == "click")
...
;-)
--jp
At 14:45 24-08-2002 -0700, Jingyu Zhu wrote:
hi there, I have the code like the following: *************file name is default.php****************** <?php if ($submit == "click"){ echo "Hello, $UserName"; } else{ echo ' <html><body> <form method="post" action="default.php"> Enter Your Name: <input type="text" name="UserName"></input><br> <input type="submit" name="submit" value="click"></input> </form> </body></html> '; } ?> **************** When I run this code and got the error message like this: **************** Notice: Undefined variable: submit in C:\PHP421\PHPCode\default.php on line 2 **************** I use IIS as the Web Server which is on a Win2000 box. I can run PHP code to get data from MySql database and send the response to the browser. So I think the script engine is good. Maybe I miss some configuration settings. Can anybody help? Thanks.________________________________________________________ Juan Pablo Aqueveque <juque@uct.cl> Ingeniero de Sistemas Departamento de Redes y Comunicaciones http://www.drc.uct.cl Universidad Católica de Temuco. Tel:(5645) 205 630 Fax:(5645) 205 628