I am generating a page that displays username, email, and then generates checkboxes for mailing lists i have, and checks them if the user is subscribed to them.
I can do this with PHP, no problem.
Now what I want to do, is if I change the checkbox to a different state than it was in, (checked or unchecked) and then press update, to have the php script update the database with the new information.
so i have 3 tables
username_table
user_id, first, last, email
subject_table
subject_id, description
subscription_table
subscription_id, user_id, subject_id
the subscription table keeps tracks of the mailing list subscriptions and is what i use to check the checkboxes the user is subscribed to.
so the problem i'm running into is having to update the database with the checkbox values...here is my html code from the generated page that displays the usernames and checkboxes, can anyone help me?
<form method="post" action="updatelist.php">
<table width="600" border="0" cellspacing="1" cellpadding="1">
Last Name</font></b></td><td><b><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="2">First Name</font></b></td><td><b><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="2">Email</font></b></td><td><b><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="2">OFDA_List1</font></b></td><td><b><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="2">OFDA_List2</font></b></td><td><b><font color="#FFFFFF" face="Arial, Helvetica, sans-serif" size="2">testing?</font></b></td></tr><tr bgcolor ="#CCCCCF"><td><font face="Arial, Helvetica, sans-serif" size="2" color="#333333">Doe</font></td><td><font face="Arial, Helvetica, sans-serif" size="2" color="#333333">John</font></td><td><font face="Arial, Helvetica, sans-serif" size="2" color="#333333"><a href ="mailto: username@domainname.com">username@domainname.com</a</font></td><input type = "hidden" name=email[] value =22><td><input type="checkbox" name="skills[]" value=1 checked></input></td><td><input type="checkbox" name="skills[]" value=2></input></td><td><input type="checkbox" name="skills[]" value=6></input></td></tr><br></tr><tr bgcolor ="#CCCCCF"><td><font face="Arial, Helvetica, sans-serif" size="2" color="#333333">LastTest</font></td><td><font face="Arial, Helvetica, sans-serif" size="2" color="#333333">FirstTest</font></td><td><font face="Arial, Helvetica, sans-serif" size="2" color="#333333"><a href ="mailto: test@test.com">test@test.com</a</font></td><input type = "hidden" name=email[] value =23><td><input type="checkbox" name="skills[]" value=1></input></td><td><input type="checkbox" name="skills[]" value=2 checked></input></td><td><input type="checkbox" name="skills[]" value=6></input></td></tr><br>
</td>
</tr>
</table>
<br>
<input type="submit" name="submit" value="Update List">