Hard coded GET values not sent from form
In the action attribute of my form element I have specified some get
values, which will be sent along with the value from the actual form.
However the values I have hardcoded in are not sent to the new document,
what am I doing wrong?
<form action="loginForm.php?type=dept" method="get">
<select name="dept" onchange="this.form.submit()">
<option value="">Department</option>
<option value="Bar">Bar</option>
<option value="Cleaning">Cleaning</option>
<option value="Kitchen">Kitchen</option>
<option value="Management">Management</option>
<option value="Maintenance">Maintenance</option>
<option value="Waiting">Waiting</option>
</select>
</form>
At the top of the loginForm file is this code, which will output 'Type not
set' every time
if(!isset($_GET['type']))
{
echo 'Type not set';
}
No comments:
Post a Comment