关于隐藏表单的一个有关问题

WBOY
Release: 2016-06-13 13:00:57
Original
764 people have browsed it

关于隐藏表单的一个问题
比如,表单这样写

<br />
<form action="admin.php?action=cat&option=delete" methot="post"><br />
<input type="hidden" name="other" value="sth" /><br />
</form><br />
Copy after login

服务器处理用$_GET[]得到action和option,用$_POST[]得到other的值,这种做法是可行的,但是应不应该这样做?
------解决方案--------------------
如果你想这样做的话,那就是可以的。
------解决方案--------------------
为什么不应该,你也可以加入一些验证。
------解决方案--------------------
还是加个验证吧。~这个有点相当于公开了delete 接口。
自己试试,直接用firebug 改参数提交能成不?
------解决方案--------------------
可以啊?why not?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!