devilmaycry
04-13-2006, 09:57 PM
hi all,
hope you can help me
i have this code from http://www.dotdragnet.com/content.php?aid=18
page1.php
<--page1.php-->
<html>
<body>
<form name="form1" method="post" action="page2.php">
<input type="text" name="name"><br>
<input type="text" name="email"><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
page2.php
<--page2.php (with error checking)-->
<html>
<body>
<p>
Hi<? if ($name) {
echo " $name.";
}
else {
echo ", what's your name? ";
}
if ($email) {
echo "Your email address is $email";
}
else {
echo "I don't know your email address either!";
}
?>
</p>
</body>
</html>
the execution is on the server ,page2 do not get the variable from page 1
u can view it here
http://www.facultedegenie.com/testphp/page1.php
the php script is well executed coz it checks the error :confused:
Any Idea Why ?
Thanks
hope you can help me
i have this code from http://www.dotdragnet.com/content.php?aid=18
page1.php
<--page1.php-->
<html>
<body>
<form name="form1" method="post" action="page2.php">
<input type="text" name="name"><br>
<input type="text" name="email"><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
page2.php
<--page2.php (with error checking)-->
<html>
<body>
<p>
Hi<? if ($name) {
echo " $name.";
}
else {
echo ", what's your name? ";
}
if ($email) {
echo "Your email address is $email";
}
else {
echo "I don't know your email address either!";
}
?>
</p>
</body>
</html>
the execution is on the server ,page2 do not get the variable from page 1
u can view it here
http://www.facultedegenie.com/testphp/page1.php
the php script is well executed coz it checks the error :confused:
Any Idea Why ?
Thanks