這篇文章主要講解了“PHP怎么獲取input輸入框中的值”,文中的講解內(nèi)容簡單清晰,易于學(xué)習(xí)與理解,下面請大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“PHP怎么獲取input輸入框中的值”吧!
前端:
php后臺(tái)接收并查詢:
public function MallList(){ //寫方法 $goods=M('shop_goods_info'); //實(shí)例化數(shù)據(jù)庫對應(yīng)的表 $codes=I('param.bianhao'); //獲取前臺(tái)文本框數(shù)據(jù) if(isset($codes) && $codes != ''){ $where['code']=$codes; $this->assign('codes',$codes); //顯示 } } $info=$classify->where(array('code'=>$code))->find(); //查詢語法
2.或者:
有$_GET 或者 $_POST
如果是GET 就換成GET
感謝各位的閱讀,以上就是“PHP怎么獲取input輸入框中的值”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對PHP怎么獲取input輸入框中的值這一問題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是創(chuàng)新互聯(lián)網(wǎng)站建設(shè)公司,,小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!