1
我想檢查查詢字符串變量是否爲null。如果使用codegniter變量不在url中,如何檢查查詢字符串爲空?
我有兩個網址之前提交:
http://localhost/Demotest/index.php?m=admin_controller&t=products&s=backend
後提交:
http://localhost/Demotest/index.php?m=admin_controller&t=products&s=backend&pid=2045
我在代碼檢查PID:
$pid = $_GET['pid'];
但這裏PID是之前未知提交頁面
形式的行動:
<form action="<?=$this->config->base_url();?>index.php?m=admin_controller&t=add_product&s=backend&pid=<?=$item->product_id?>" method="post" name="form" >
你怎麼通過'pid'? – urfusion
我在表單提交時傳遞了pid –
你怎麼生成'pid'? – urfusion