我想这样做如果我的表单被提交然后复选框应该被选中。如果表单被提交,那么复选框被选中
以下是我有:
<input type="checkbox" id="chk" <?php if ($_POST['submit']){ echo checked } ?> />
HTML:
<form id="form1" enctype="multipart/form-data" action="" method="post">
//Stuff here
<input name="submit" type="submit" value="Upload" />
</form>
我收到的时候我测试了一个空白页...任何帮助将不胜感激。
'if(isset($ _ POST ['submit']))'你有一个名为submit的输入吗? – 2014-12-02 03:48:18