Hi, now that I have your attention with the mysterious topic title lol, I need a little help with something.
Basically I am creating a form that sends out emails via addresses from a database table. I also have it so that each email is inserted to a group and each group has a corresponding id/number.
So an example row in my database would be:
id = 1
email = test@test.com
group_id = 3
pref = HTML
And in my form I have checkboxes which each contact the value/name of the group_id such “1, 2, 3, 4, 5” etc.
So what I want is so that when the checkbox for group 3 is checked send to the email with the group_id which is 3?
I have tried various things such as:
if(isset($_POST['submit']) && ($row_email['group_id'] == $_POST['group_id'])){
////something
}
Now I know that is not it, I can’t find the actual bit I’m using cuz I’m on a different comp at the moment, but the problem maybe is because I’m using a loop to input the name/value in my checkboxes if that makes any sense?
Plus I haven’t really used checkboxes before, I know there is someting to do with “on” and “true” etc. argh I’m really confused!!! lol. It’s a bit late as I type this, but If no one knows what I mean at the moment, I’ll try and elaborate a bit more later if I can.
Thanks in advanced.