Can any body help? Thanks.
| From: | Jingyu Zhu | Date: | Sat, 24 Aug 2002 21:45:55 +0000 |
| Subject: | Can any body help? Thanks. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-113965@lists.php.net to get a copy of this message | ||
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.