<html><body><form method=post action="welcome.php">Name: <input type="text" name="name" /><input type="submit" value="check" /></form></body></html><html><body><?phpecho $_POST["name"];?></body></html>點擊提交后一篇空白。求解?。。?
3 回答

寶慕林4294392
TA貢獻2021條經(jīng)驗 獲得超8個贊
首先,語法沒有問題
我分析可能有兩個原因
1.你index.html 和 welcome.php不在同一個目錄下
action="welcome.php" 表示的是相對路徑
2.你可能是直接雙擊打開的index.html
必須要在php環(huán)境下打開index.html

守候你守候我
TA貢獻1802條經(jīng)驗 獲得超10個贊
<form method=post action= "welcome.php" > |
你這個頁面跳轉(zhuǎn)到welcome.php 這個頁面有輸出么?
如果你希望吧name 提交到本頁 那么就
<form method= "post" action= "" > |
- 3 回答
- 0 關(guān)注
- 336 瀏覽
添加回答
舉報
0/150
提交
取消