This topic has been archived. It cannot be replied.
-
工作学习 / IT技术讨论 / 各位,PHP入门问题紧急求救!!做了一个form:
<html>
<!-- form.php -->
<form method=post action="booking.php">
First Name:
<input name="firstName" type="text">
<input name="enter" type="submit" value="Enter">
</form>
</html>
又做了一个booking:
<html>
<!-- booking.php -->
<?php
echo ("Wlcome to" . $firstName);
?>
</html>
就是这个再也不能简单的问题总运行不对,只显示 Welcome,但是应该显示Welcome XXX.
是何原因,请指教!!多谢!
-bigdesk(nothing);
2002-4-1
{427}
(#429323@0)
-
up
-bigdesk(nothing);
2002-4-1
(#429346@0)
-
$firstName = $HTTP_POST_VARS["firstName"];
-bingle(bingle);
2002-4-1
(#429465@0)
-
bingle, did it work?<?
// booking.php
$first = $HTTP_POST_VARS["f"];
echo ("Wlcome to" . $first) ;
?>
in IE when i input:
http://localhost/booking.php?f=12
in address box, it still only returns:
Welcome to
what's wrong?
thanks for your help!
-bigdesk(nothing);
2002-4-2
{251}
(#431114@0)
-
因为HTTP_POST_VARS["f"]; 要求的POST变量,写在地址栏不行。
-bingle(bingle);
2002-4-2
(#431227@0)
-
great! it's working. thanks!
-bigdesk(nothing);
2002-4-2
(#431232@0)