十年網(wǎng)站開發(fā)經(jīng)驗(yàn) + 多家企業(yè)客戶 + 靠譜的建站團(tuán)隊
量身定制 + 運(yùn)營維護(hù)+專業(yè)推廣+無憂售后,網(wǎng)站問題一站解決
通過表單,例如:
公司專注于為企業(yè)提供網(wǎng)站設(shè)計、網(wǎng)站制作、微信公眾號開發(fā)、電子商務(wù)商城網(wǎng)站建設(shè),微信小程序,軟件按需網(wǎng)站建設(shè)等一站式互聯(lián)網(wǎng)企業(yè)服務(wù)。憑借多年豐富的經(jīng)驗(yàn),我們會仔細(xì)了解各客戶的需求而做出多方面的分析、設(shè)計、整合,為客戶設(shè)計出具風(fēng)格及創(chuàng)意性的商業(yè)解決方案,創(chuàng)新互聯(lián)建站更提供一系列網(wǎng)站制作和網(wǎng)站推廣的服務(wù)。
form?action="form_action.php?method="get"
pFirst?name:?input?type="text"?name="fname"?//p
pLast?name:?input?type="text"?name="lname"?//p
input?type="submit"?value="Submit"?/
/form
其中的input 中的 name 就可以被PHP接收
test.php頁面
判斷該頁是否提交,如果提交了,就按照正常的接受數(shù)據(jù)來就行了。
?php
if($_POST){
$words?=?$_POST["words"];
if?($words)?{
echo?"收到";
}
}
?
!DOCTYPE?html
html?lang="en"
head
meta?charset="UTF-8"
titleDocument/title
/head
body
form?action="test.php"?method="post"
input?type="text"?name="words"
input?type="submit"?name=""?value="提交"
/form
/body
/html
html
head
meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/
title無標(biāo)題文檔/title
/head
body
form?action=""?method="get"
Name:?input?type="text"?name="name"?/
input?type="submit"?/
/form
?php
$name=$_GET['name'];
echo?"歡迎你:".$name;
?
/body
/html
這個需要使用php中的$_REQUEST["code"]全局變量的方式,據(jù)可以獲取到HTML傳輸過來的數(shù)據(jù)了。