PHP編程
PHP編程學習:取得HTML傳遞參數
今天學習的是關於「取得HTML傳遞參數」相關的教程,主要是學習了 $_GET和$_POST的應用。
<form class="form" action="./index.php" method="get">
<input type="text" name="yourname" placeholder="請輸入內容">
<button type="submit" >
送出
</button>
</form>
<?php
echo "GET yourname 的值是:". $_GET[yourname] . "<br/>";
echo "POST yourname 的值是:" . $_POST[yourname] . "<br/>";
?>
<a href="./index.html">送出條件</a>
<form class="form" action="./index.php" method="get">
<input type="text" name="yourname" placeholder="請輸入內容">
<button type="submit" >
送出
</button>
</form>
<?php
echo "GET yourname 的值是:". $_GET[yourname] . "<br/>";
echo "POST yourname 的值是:" . $_POST[yourname] . "<br/>";
?>
<a href="./index.html">送出條件</a>
參考的學習教程在這裡也貼一下,感謝老師的分享:取得HTML傳遞參數
Post a Comment
0 Comments