hans8233
02-10-2010, 01:53 AM
Hi All-
Sorry to post again, need some help on this. I made a checkbox for my registry on my site. It's a home-made gift registry, so I have a checkbox form at bottom of page for people to notify us when they got a gift. I just want them to check the gift, hit submit, and I would get an email saying which gift(s) they checked.
Here's my form html:
<form action="checkbox-form.php" method="post">
<tr>
<td><span class="style1"><span class="style1">Please let us know if you got us one of these gifts!<br />
<input type="checkbox" name="giftBought[]" value="Pasta_Maker" />
Pasta Maker<br />
<input type="checkbox" name="giftBought[]" value="Ravioli_Attachment" />
Ravioli Attachment<br />
<input type="checkbox" name="giftBought[]" value="Coffee_Pot" />
Coffee Pot<br />
<input type="checkbox" name="giftBought[]" value="Lantern" />
Lantern<br />
<input type="checkbox" name="giftBought[]" value="Tent" />
Tent<br/>
<input type="checkbox" name="giftBought[]" value="SleepingBag" />
Sleeping Bag<br/>
<input type="checkbox" name="giftBought[]" value="SleepingBag" />
Sleeping Bag<br/>
<input type="checkbox" name="giftBought[]" value="iPod_Radio" />
Ipod Radio</span><br/>
<input type="image" name="formSubmit" value="Submit" src="rsvp_menubtns/submit.png"/>
</form>
Here's my php as is:
<?
error_reporting(E_ALL);
$to='myemail@gmail.com';
$subject = "Registry Purchase";
foreach($_POST['giftBought'] as $value) {
$check_msg .= "Checked: $value\n";
}
$body = "Item: $check_msg";
?>
It's just going to a blank php, and I'm not getting an errors. Anythoughts?
Thanks so much! I'm trying to get this done to keep my future (hopefully) wife's sanity :)
Sorry to post again, need some help on this. I made a checkbox for my registry on my site. It's a home-made gift registry, so I have a checkbox form at bottom of page for people to notify us when they got a gift. I just want them to check the gift, hit submit, and I would get an email saying which gift(s) they checked.
Here's my form html:
<form action="checkbox-form.php" method="post">
<tr>
<td><span class="style1"><span class="style1">Please let us know if you got us one of these gifts!<br />
<input type="checkbox" name="giftBought[]" value="Pasta_Maker" />
Pasta Maker<br />
<input type="checkbox" name="giftBought[]" value="Ravioli_Attachment" />
Ravioli Attachment<br />
<input type="checkbox" name="giftBought[]" value="Coffee_Pot" />
Coffee Pot<br />
<input type="checkbox" name="giftBought[]" value="Lantern" />
Lantern<br />
<input type="checkbox" name="giftBought[]" value="Tent" />
Tent<br/>
<input type="checkbox" name="giftBought[]" value="SleepingBag" />
Sleeping Bag<br/>
<input type="checkbox" name="giftBought[]" value="SleepingBag" />
Sleeping Bag<br/>
<input type="checkbox" name="giftBought[]" value="iPod_Radio" />
Ipod Radio</span><br/>
<input type="image" name="formSubmit" value="Submit" src="rsvp_menubtns/submit.png"/>
</form>
Here's my php as is:
<?
error_reporting(E_ALL);
$to='myemail@gmail.com';
$subject = "Registry Purchase";
foreach($_POST['giftBought'] as $value) {
$check_msg .= "Checked: $value\n";
}
$body = "Item: $check_msg";
?>
It's just going to a blank php, and I'm not getting an errors. Anythoughts?
Thanks so much! I'm trying to get this done to keep my future (hopefully) wife's sanity :)