eddie3002 Posted February 19, 2009 Share Posted February 19, 2009 I need help getting this invitation form to work I have included the HTML code and also the PHP code. All help is greatly appreciated. <----here is the html form code------> <FORM METHOD="post" ACTION="submit_mail.php" onsubmit="return checkform();" name="frm"> <table width="90%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="31%" class="main-txt">Email Addresses </td> <td width="5%"><div align="center">:</div></td> <td width="64%"><input name="host_name2" type="text" class="form-input" id="host_name" size="39" /></td> </tr> <tr> <td colspan="3" class="main-txt" height="10"></td> </tr> <tr> <td width="31%" class="main-txt">Host Name </td> <td width="5%"><div align="center">:</div></td> <td width="64%"><input name="host_name" type="text" class="form-input" id="Host Name " size="39" /></td> </tr> <tr> <td colspan="3" class="main-txt" height="10"></td> </tr> <tr> <td class="main-txt">Telephone</td> <td><div align="center">:</div></td> <td><input name="telephone" type="text" class="form-input" id="Telephone" size="39" /></td> </tr> <tr> <td colspan="3" class="main-txt" height="10"></td> </tr> <tr> <td class="main-txt">Address<br /></td> <td><div align="center">:</div></td> <td><textarea name="address" cols="35" rows="5" class="form-input2" id="textarea"></textarea></td> </tr> <tr> <td colspan="3" class="main-txt" height="10"></td> </tr> <tr> <td class="main-txt">City<br /></td> <td><div align="center">:</div></td> <td><input name="city" type="text" class="form-input" id="City" size="39" /></td> </tr> <tr> <td colspan="3" class="main-txt" height="10"></td> </tr> <tr> <td class="main-txt">State</td> <td><div align="center">:</div></td> <td><input name="state" type="text" class="form-input" id="State" size="39" /></td> </tr> <tr> <td colspan="3" class="main-txt" height="10"></td> </tr> <tr> <td class="main-txt">Zipcode</td> <td><div align="center">:</div></td> <td><input name="zipcode" type="text" class="form-input" id="Zipcode" size="39" /></td> </tr> <tr> <td colspan="3" class="main-txt" height="10"></td> </tr> <tr> <td class="main-txt">Party Date</td> <td><div align="center">:</div></td> <td><input name="party_date" type="text" class="form-input" id="Party Date" size="39" /></td> </tr> <tr> <td colspan="3" class="main-txt" height="10"></td> </tr> <tr> <td class="main-txt">Party Time</td> <td><div align="center">:</div></td> <td><input name="party_time" type="text" class="form-input" id="Party Time" size="39" /></td> </tr> <tr> <td colspan="3" class="main-txt" height="10"></td> </tr> <tr> <td class="main-txt">Message</td> <td><div align="center">:</div></td> <td><label> <textarea name="message" cols="35" rows="5" class="form-input2" id="Party Address"></textarea> </label></td> </tr> <tr> <td colspan="3" class="main-txt" height="10"></td> </tr> <tr> <td colspan="3" class="main-txt" height="15"></td> </tr> <tr> <td class="main-txt"> </td> <td> </td> <td><label><input type="image" src="gold/send-btrn-gold.gif" width="208" height="77" /></label></td> </tr> <!-- <tr> <td colspan="3" class="main-txt" height="15"></td> </tr> --> </table> </FORM> <----here is the PHP code------> <? $email_ids=explode(",",$_POST['email']); for($i=0;$i<=count($email_ids)-1;$i++) { $to = $email_ids[$i]; $from = "info@vintagesportscardmemorabilia.com"; $subject = "Invitaion - vintagesportscardmemorabilia.com"; $sub2 = "Someone has sent invitation"; $msg ="Hello,\n\nYou have been invited to join the vintage Sports party. The details of the invitation are as follows:\n\n"; $msg.="Host Name : ".$_POST['host_name']."\n"; $msg.="Telephone : ".$_POST['telephone']."\n"; $msg.="Address : ".$_POST['address']."\n"; $msg.="City : ".$_POST['city']."\n"; $msg.="State : ".$_POST['state']."\n"; $msg.="Zipcode : ".$_POST['zipcode']."\n"; $msg.="Party Date : ".$_POST['party_date']."\n"; $msg.="Party Time : ".$_POST['party_time']."\n"; $msg.="Message : ".$_POST['message']."\n"; $msg.="\n\nThanks\nvintagesportscardmemorabilia.com\nhttp://vintagesportscardmemorabilia.com/"; $headers="MIME-Version: 1.0\r\n"; $headers.="Content-type: text/plain; charset=iso-8859-1\r\n"; $headers.="From: $from\r\n\n"; $msgg = "Someone has sent invitation to $to,\n$msg"; mail($to, $subject, $msg, $headers); @mail("eddie3002@yahoo.com",$sub2,$msgg, $headers); } header("location:send-invitations-thanks.html"); exit; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.