Hi. Does anyone know of a good tutorial on arrays using PHp and MySQL? I need to make drop-down boxes in HTML and have thier value inserted into a MySQL database.
Thanks in advance for any help.
have you seen: http://www.devshed.com/Server_Side/PHP/ArrayManip/page1.html
I think the tricky thing is when you return getting the right value selected. For that I just loop through my choices array putting the values into $choice and $choiceName and comparing to $val
echo "<option value='$choice' " . ($val == $choice?" selected ": "") . ">$choiceName</option>";