form and php
| From: | Tao Hou | Date: | Fri, 04 Oct 2002 17:20:40 +0000 |
| Subject: | form and php | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-118894@lists.php.net to get a copy of this message | ||
Hi,
I jsut install apache1.3.26 and php 4.2.3 on my win2000 machine for my
course project.
when I run:
<?
phpinfo();
?>
everything works fine, it will show me the information. but when I try
the followings, it give me an error:
****************test.html********************
<html>
<title>This page is for Power Calculation</title>
<body>
<form action="testphp1.php" method="GET">
Variable 1: <input type="text" name="varone">
Variable 2: <input type="text" name="vartwo">
<br>
<input type="submit" name="submit" value="Submit Variables">
<input type="reset">
</form>
</body>
</html>
****************testphp1.php****************
<html>
<title>Test</title>
<body>
<p><b>Test</b></p>
<?php
$tmp = 20;
print("the value of tmp variable is $tmp");
print("the first variable is $varone");
print("the second variable is $vartwo");
?>
</body>
</html>
************error message ********************
Test
the value of tmp variable is 20
Notice: Undefined variable: varone in c:\apache\htdocs\testphp1.php on
line 8
the first variable is
Notice: Undefined variable: vartwo in c:\apache\htdocs\testphp1.php on
line 9
the second variable is
***************************************************************
please help me, thank you