分页用POST应该怎么处理
1个回答
展开全部
解决方案:
使用$_REQUEST代替$_POST,$_REQUEST既可用于POST方法传递来的参数
也可用于GET方法传递的参数
step2 对form的post参数在换页时要重新传递
例子:
form:
<form method="post" action="searchresult.php">
<table class="core" style="text-indent: 2em;">
<tbody>
<tr>
<td>
<p><input type="radio" name="extent" value="category">By category.
<select style="font-family:Tahoma; font-size:12px; width:250px;" name="ca
tegory">
<option value="Aero Animal">Aero Animal</option>
<option value="Aero Fungi">Aero Fungi</option>
<option value="Aero Insect">Aero Insect</option>
<option value="Aero Mite">Aero Mite</option>
<option value="Aero Plant">Aero Plant</option>
<option value="Contact">Contact</option>
<option value="Food Animal">Food Animal</option>
<option value="Food Fungi">Food Fungi</option>
<option value="Food Plant">Food Plant</option>
<option value="Gliadin">Gliadin</option>
<option value="Protozoan">Protozoan</option>
<option value="Venom/Salivary">Venom/Salivary</option>
<option value="Worm">Worm</option>
</select>
</p>
<p><input type="radio" name="extent" value="species">By species.
<select style="font-family:Tahoma; font-size:12px; width:250px;" name="sp
ecies">
<option value="other">Other</option>
<option value="Actinidia">Actinidia</option>
<option value="Alternata">Alternata</option>
<option value="Anisakis simplex">Anisakis simplex</option>
<option value="Aspergillus">Aspergillus</option>
<option value="maize">Maize</option>
<option value="Actinidia">Actinidia</option>
<option value="Alternata">Alternata</option>
<option value="Anisakis simplex">Anisakis simplex</option>
<option value="Aspergillus">Aspergillus</option>
<option value="Buckwheat">Buckwheat</option>
<option value="Carpinus">Carpinus</option>
<option value="cattle">Cattle</option>
<option value="Cedar">Cedar</option>
<option value="Chironomus">Chironomus</option>
<option value="Cockroach">Cockroach</option>
<option value="Grass">Grass</option>
<option value="Hazelnut">Hazelnut</option>
<option value="Hevea brasiliensis">Hevea brasiliensis</option>
<option value="Maize">Maize</option>
<option value="Malus">Malus</option>
<option value="Mite">Mite</option>
<option value="Olive">Olive</option>
<option value="Peanut">Peanut</option>
<option value="Pendula">Pendula</option>
<option value="Potato">Potato</option>
<option value="Roundworm">Roundworm</option>
<option value="Soybean">Soybean</option>
<option value="Tomato">Tomato</option>
<option value="Tropicalis">Tropicalis</option>
<option value="Wheat">Wheat</option>
</select>
</p>
<p><input type="radio" name="extent" value="all" checked="checked">List
all.</p>
</td>
</tr>
<tr>
<td>
<input name="B1" type="submit" value="Search" />
<input name="B2" type="reset" value="Reset" />
<input name="absolutepage" type="hidden" value=""/>
</td>
</tr>
</tbody>
</table>
</form>
使用$_REQUEST代替$_POST,$_REQUEST既可用于POST方法传递来的参数
也可用于GET方法传递的参数
step2 对form的post参数在换页时要重新传递
例子:
form:
<form method="post" action="searchresult.php">
<table class="core" style="text-indent: 2em;">
<tbody>
<tr>
<td>
<p><input type="radio" name="extent" value="category">By category.
<select style="font-family:Tahoma; font-size:12px; width:250px;" name="ca
tegory">
<option value="Aero Animal">Aero Animal</option>
<option value="Aero Fungi">Aero Fungi</option>
<option value="Aero Insect">Aero Insect</option>
<option value="Aero Mite">Aero Mite</option>
<option value="Aero Plant">Aero Plant</option>
<option value="Contact">Contact</option>
<option value="Food Animal">Food Animal</option>
<option value="Food Fungi">Food Fungi</option>
<option value="Food Plant">Food Plant</option>
<option value="Gliadin">Gliadin</option>
<option value="Protozoan">Protozoan</option>
<option value="Venom/Salivary">Venom/Salivary</option>
<option value="Worm">Worm</option>
</select>
</p>
<p><input type="radio" name="extent" value="species">By species.
<select style="font-family:Tahoma; font-size:12px; width:250px;" name="sp
ecies">
<option value="other">Other</option>
<option value="Actinidia">Actinidia</option>
<option value="Alternata">Alternata</option>
<option value="Anisakis simplex">Anisakis simplex</option>
<option value="Aspergillus">Aspergillus</option>
<option value="maize">Maize</option>
<option value="Actinidia">Actinidia</option>
<option value="Alternata">Alternata</option>
<option value="Anisakis simplex">Anisakis simplex</option>
<option value="Aspergillus">Aspergillus</option>
<option value="Buckwheat">Buckwheat</option>
<option value="Carpinus">Carpinus</option>
<option value="cattle">Cattle</option>
<option value="Cedar">Cedar</option>
<option value="Chironomus">Chironomus</option>
<option value="Cockroach">Cockroach</option>
<option value="Grass">Grass</option>
<option value="Hazelnut">Hazelnut</option>
<option value="Hevea brasiliensis">Hevea brasiliensis</option>
<option value="Maize">Maize</option>
<option value="Malus">Malus</option>
<option value="Mite">Mite</option>
<option value="Olive">Olive</option>
<option value="Peanut">Peanut</option>
<option value="Pendula">Pendula</option>
<option value="Potato">Potato</option>
<option value="Roundworm">Roundworm</option>
<option value="Soybean">Soybean</option>
<option value="Tomato">Tomato</option>
<option value="Tropicalis">Tropicalis</option>
<option value="Wheat">Wheat</option>
</select>
</p>
<p><input type="radio" name="extent" value="all" checked="checked">List
all.</p>
</td>
</tr>
<tr>
<td>
<input name="B1" type="submit" value="Search" />
<input name="B2" type="reset" value="Reset" />
<input name="absolutepage" type="hidden" value=""/>
</td>
</tr>
</tbody>
</table>
</form>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询