作者adddream (哆啦A孟)
看板PHP
標題[請益] 變數沒有辦法傳
時間Wed Mar 7 12:25:24 2007
不好意思剛學PHP@@,所以可能問的問題對各位而言很簡單 @@
兩個檔案,分別為index.html及 abc.php
如下所示
index.html 為 :
<html>
<title>PHP says hello</title>
<body>
<form method="post" action="abc.php">
Your Name: <input type="text" name="user">
<br/>
<input type="submit" value="say hello">
</form>
</body>
</html>
abc.php 為 :
<html>
<title>PHP hello</title>
<head></head>
<body>
<?php
print "hello, ";
print $_post['user'];
print "!";
?>
</body>
</html>
理想結果應該是 假設在index.html打入abc
那應該會在abc.php網頁出現 hello, abc!
實際結果為
hello, !
也就是我的變數的資料好像沒有傳到abc.php裡。
請各位版大 幫幫忙 謝謝囉
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.122.79.88
→ lazyhome:$_POST ... 請大寫 .... XD 03/07 12:42
推 peteraaa:XD 03/07 15:44
→ adddream:THANKS XD 03/07 16:51