ThinkPHP数据库查询结果在表单展示

WBOY
Release: 2016-06-13 10:56:52
Original
1016 people have browsed it

ThinkPHP数据库查询结果在表单显示
数据库中表为个人信息表,有性别字段,用ThinkPHP从数据库中取出数据之后,如何根据结果,改变表单中




那个单选框被选中呢?

------解决方案--------------------
假设你取出来的值为 $sex,
/>男
/>女
------解决方案--------------------

HTML code
<input type="radio" name="sex" value="男" checked>男<br><font color="#e78608">------解决方案--------------------</font><br><if condition="$vo['sex'] eq '男'"><br>男<br><else></else><br>女<br></if><div class="clear">
                 
              
              
        
            </div>
Copy after login
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!