Php 如何回显所选复选框?尝试下面的方法。有什么想法吗

Php 如何回显所选复选框?尝试下面的方法。有什么想法吗,php,checkbox,echo,selected,Php,Checkbox,Echo,Selected,或者你到底想做什么 if (isset($_POST['industry_sector1'])) echo "First checkbox checked"; if (isset($_POST['industry_sector2'])) echo "Second checkbox checked"; 或者你到底想做什么?>客户服务 if (isset($_POST['industry_sector1'])) echo "First checkbox checked"; if (is

或者你到底想做什么

if (isset($_POST['industry_sector1']))
  echo "First checkbox checked";
if (isset($_POST['industry_sector2']))
  echo "Second checkbox checked";
或者你到底想做什么?

>客户服务
if (isset($_POST['industry_sector1']))
  echo "First checkbox checked";
if (isset($_POST['industry_sector2']))
  echo "Second checkbox checked";
>客户服务

我试图为用户提供一个页面,让他们可以查看以前选中的选项。他们应该能够检查各种选项。@ope,您从哪里获得这些以前的选项?数据库邮递我试图给用户一个页面,让他们可以查看以前选中的选项。他们应该能够检查各种选项。@ope,您从哪里获得这些以前的选项?数据库邮递
<input type="checkbox" value="Administrative"   name="industry_sector1" <?php if(isset($_POST['industry_sector1'])) echo 'checked="checked"'; ?>> Administrative
<input type="checkbox" value="Customer Service" name="industry_sector2" <?php if(isset($_POST['industry_sector2'])) echo 'checked="checked"'; ?>> Customer Service