Hi,
I’m probably making a really basic error here - I have a sign up form with 3 checkboxes for different opt-outs that look like this:
<input type="checkbox" id="email_opt" name="email_opt" value="1" /></li>
If the user checks it, 1 is passed through the php and posted to the database, but if it’s left blank I get:
Notice: Undefined index: email_opt in Sites/mysite/signup.php on line 18
I’m posting it with:
$email_opt = $_POST['email_opt'];
I’m assuming as its blank the thing I’m trying to post doesn’t exist, but I can’t see how to fix it.
Any help would be great.
Cheers