Hi,
What errors do you see in the following. I'm getting a parse error at the while statement.
And in general, I am having problems getting the data posted to the mysql database:
<b>PLEASE INDICATE THE FOLLOWING:</b></font></p>
<p><font face="arial" size="2"><b>Profession:</b></font></p>
<p><font face="arial" size="2"><input type="checkbox" name="visitor_profession[0]">Lighting Showroom</font></p>
<p><font face="arial" size="2"><input type="checkbox" name="visitor_profession[1]">Designer</font></p>
<p><font face="arial" size="2"><input type="checkbox" name="visitor_profession[2]">Architect</font></p>
<p><font face="arial" size="2"><input type="checkbox" name="visitor_profession[3]">Electrical Supply Wholesaler</font></p>
<p><font face="arial" size="2"><input type="checkbox" name="visitor_profession[4]">Purchasing Agent</font></p>
<p><font face="arial" size="2"><input type="checkbox" name="visitor_profession[5]">Sales Representative</font></p>
<p><font face="arial" size="2"><input type="checkbox" name="visitor_profession[6]">Other</font></p>
<?php
reset($visitor_profession);
while( each($id, $value) = list($visitor_profession) )
{
if($value == "on")
{
db_query("INSERT visitor_profession ".
"(user_ID, profession_id) ".
"VALUES ($user_ID, $id)");
}
}
?>
<b>Please Specify if Your Profession is not Listed</b>
<p><font face="arial" size="2">PROFESSION:<input type="text" name="visitor_profession_specified" size="48">
<p><font face="arial" color="red" size="2"><b>REQUESTS CAN
NOT BE PROCESSED WITHOUT TOTALLY COMPLETED FORM</b></font>
<p><input type="submit" name="submit" value="Submit" value="Reset">
</table>
</FORM>
<?php
}
?>