我是PHP中的新手。我想知道,我通過html表單和.php文件獲取數據。 像:有沒有什麼辦法從PHP代碼中獲取數據來自
<form id="form1" name="form1" method="post" action="show.php">
<strong>Please Enter the Unique id</strong><br/><br/>
Unique id:
<!-- name of this text field is "tel" -->
<input name="id" type="text" id="id" />
<p>
<input type="submit" name="Submit" value="Submit" />
</p>
</form>
</html>
然後,我用show.php文件,以獲得「id'.like:
$id=$_POST['id'];
有什麼辦法由PHP代碼把輸入??? 更新:
在「C」我們把螞蟻輸入通過這種方式
scanf("%d",a);
,有沒有辦法在PHP.I這樣做覺得現在你可以很清楚我想說??
謝謝 Yasir Adnan。
你是什麼意思*「通過php代碼輸入」*? – deceze
$ id = $ _ POST ['id']; **是'php code'**。我想你需要解釋一下你想要的更好一點,這樣人們可以回答你的問題。 – vascowhite
您正在使用PHP進行輸入,但您必須從某處取得*。那個地方通常是一種形式。 – Quentin