php表單自動提交
發布時間: 2025-03-07 08:56:09
㈠ 怎麼在php 使用post表單提交
<formaction="url.php"method="post">
<p><inputtype="text"name="username"value=""></p>
<p><inputtype="submit"name="submit"value="提交"></p>
</form>
㈡ php表單怎樣提交到當前頁面,並用$_POST獲取其值
<?php
$username=$_POST['username'];
?>
<form action="" ><input type="text" name="username"><input type="submit" name="submit" value="提交"></form>
form的action屬性留空的話就直接提交到當前頁面了 後台直接$_POST獲取前台傳過來的表單域啊
熱點內容