I'm beginning a form that asks questions and has a drop down list of options to choose from. I'm going to use PHP to check for errors, loops to cut down on repetition, etc., but right now I'm just testing code at a basic level.
Here's the PHP:
Code: Select all
if(isset($_POST['submit'])){
$value[1] = $_POST['choice1'];
$value[2] = $_POST['choice2'];
$value[3] = $_POST['choice3'];
}
else {
$value[1] = 'Choose one...';
$value[2] = 'Choose one...';
$value[3] = 'Choose one...';
}Code: Select all
<select name="choice1">
<option value="0">'.$value[1].'</option>
<option value="Addressed">Addressed</option>
<option value="Does not apply">Does not apply</option>
<option value="Needs attention">Needs attention</option>
</select>Any idea what's happening here?
Many thanks,
Andy