Undefined index html
问题 I'm new to html so i'm unsure where im going wrong but i have the following code (i'm creating a form and adding values to the database when the user presses submit). a checkbox nested in a form - <label for="choice1">Windows 7</label> <input type="checkbox" name="choice1"/> and when the user presses 'add button' i'm trying to get the value and store it in a variable but it cannot find 'choice1'. $choice1=$_POST['choice1']; but i get " Undefined index: choice1 ". Why is this? 回答1: If the