php怎么处理复选的投票功能
小弟有个问题想请教大家
我现在有个复选框的表单
数据库是这样的:
id name tic(得票数)
1 篮球 0
2 足球 0
3 排球 0
我想实现的功能是表单提交后,选中的复选框对应的数据库里的tic得票数加1
------解决方案--------------------PHP codeforeach($_POST['sport'] as $id){ mysql_query("update tt set tic=tic+1 where id=$id");}<div class="clear">
</div>
Statement: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