I believe -> <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 " . $_POST['varone']); print("the second variable is " . $_POST['vartwo']); ?> </body> </html>
Tao Hou wrote: >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 > > > > > -- Gerard Samuel http://www.trini0.org:81/ http://dev.trini0.org:81/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php