hi friends,
i am new to this forum. i got a problem for sending mail to checked values(check box) on the form. i enclosed the file for us. please any one check this and fix my error as soon.
hi friends,
i am new to this forum. i got a problem for sending mail to checked values(check box) on the form. i enclosed the file for us. please any one check this and fix my error as soon.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/stylesheet.css" rel="stylesheet" type="text/css" media="all" />
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top"><table width="756" height="924" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="756" align="left" valign="top"><table width="753" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="179" align="left" valign="middle"><a href="http://ic.longaberger.com/esuite/home/rvincent"><img src="images/logo1.gif" alt="Longaberger Gift Baskets" border="0" /></a></td>
<td width="574" height="52" align="left" valign="middle"><div align="right"><img src="images/address.gif" border="0" alt="Longaberger Independent Home Consultant" usemap="#Map2" />
<map name="Map2" id="Map2">
<area shape="rect" coords="29,47,116,59" href="mailto:rmvince1@gmail.com" />
</map>
</div></td>
</tr>
<tr>
<td height="261" rowspan="2" align="left" valign="top"><table width="170" height="826" border="0" cellpadding="0" cellspacing="0">
<tr class="menu_table">
<td width="170" height="27" align="left" valign="middle"><a href="index.html" class="left_link" style="color:#C9232D;" title="Roses Gift Ideas">Home</a></td>
</tr>
<tr class="menu_table">
<td width="170" height="27" align="left" valign="middle"><a href="contact.html" class="left_link" title="Contact Roses Gift Ideas">Contact Us</a></td>
</tr>
<tr class="menu_table">
<td height="27" align="left" valign="middle"><a href="featured-products.html" class="left_link" title="Birthday Gift Products">Featured Products</a></td>
</tr>
<tr class="menu_table">
<td height="27" align="left" valign="middle"><a href="team-spirit.html" class="left_link" title="Team Baskets">Team Spirit</a></td>
</tr>
<tr class="menu_table">
<td height="27" align="left" valign="middle"><a href="seasonal-basket.html" class="left_link" title="Wholesale Gift Baskets">Seasonal Baskets</a></td>
</tr>
<tr class="menu_table">
<td height="27" align="left" valign="middle"><a href="seasonal-pottery.html" class="left_link" title="Wedding Gift Products">Seasonal Pottery</a></td>
</tr>
<tr class="menu_table">
<td height="27" align="left" valign="middle"><a href="baskets-accessories.html" class="left_link" title="Storage Baskets & Accessories">Baskets & Accessories</a></td>
</tr>
<tr class="menu_table">
<td height="27" align="left" valign="middle"><a href="collectors-club.html" class="left_link" title="Gift Basket Series">Collectors Club</a></td>
</tr>
<tr class="menu_table">
<td height="27" align="left" valign="middle"><a href="pottery.html" class="left_link" title="Luncheon Plates and Dinnerware sets">Pottery</a></td>
</tr>
<tr class="menu_table">
<td height="27" align="left" valign="middle"><a href="tabletop.html" class="left_link" title="Napkins and Placemats">Tabletop</a></td>
</tr>
<tr class="menu_table">
<td height="27" align="left" valign="middle"><a href="wrought-iron.html" class="left_link" title="Media and Magazine Rack">Wrought Iron</a></td>
</tr>
<tr class="menu_table">
<td height="38" align="left" valign="middle"><a href="current-flyer.html" class="left_link" title="Flyer Gift Ideas">View Current Flyer</a></td>
</tr>
<tr class="menu_table">
<td height="38" align="left" valign="middle"><a href="past-features.html" class="left_link" title="Special Basket Products">Past Features</a></td>
</tr>
<tr>
<td width="167" height="507" align="left" valign="top"><div align="center"><br />
<a href="http://ic.longaberger.com/ecommerce/control/category?PURCHASE_STATE=STANDARD&category_id=31864POT"><img src="images/soup-sandwich-plate.JPG" alt="Gift Basket Ideas" width="144" height="216" border="0" /></a></div>
<br /><div align="center"><a href="homestead-online.html"><img src="http://www.rosesgiftideas.com/images/store.jpg" border="0" alt="Online Factory and Homestead Baskets Store"/></a></div>
<br /><div align="center"><a href="homestead-online.html" class="new" title="Shop Baskets Online">Click here to shop Homestead & Factory store online</a></div></td>
</tr>
</table></td>
<td height="282" align="left" valign="top" class="header_image"> </td>
</tr>
<tr>
<td width="574" rowspan="3" align="left" valign="top"><table width="574" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="4" height="16" align="center" valign="middle" bgcolor="#5B3524" style="font-size:10px; color:#FFF;">Thank You For Contacting Us</td>
</tr>
<tr>
<td colspan="4" align="left" valign="top"> </td>
</tr>
<tr>
<td><?php
$fname=$_REQUEST["FName"];
$lname=$_REQUEST["LName"];
$Email=$_REQUEST["Email"];
$format=$_REQUEST["format"];
$nletter=empty($_REQUEST['news']) ? array() : (array) $_REQUEST['news'];
$from = "$Email";
$to = "mailtorsk81@gmail.com";
$subject = "Subscribing newsletter from '$fname'";
$message = 'Please find the user details below:
First Name: '.$fname.'
Last Name: '.$lname.'
Email: '.$Email.'
Selected Newsletter Format: '.$format.'
Selected Newsletters: '.$nletter.'';
$headers = "From: $from";
mail($to,$subject,$message,$headers);
echo "You are subscribed our newsletter successfully."
?>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p></td>
</tr>
</table></td></tr>
</table></td>
</tr>
<tr>
<td align="left" valign="top"><table width="756" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="27" style="border-top:2px solid #78462F;"><div align="center"><a href="http://www.longaberger.com/ourCompany.aspx" class="bottom_link" title="Longaberger">Our Company</a> | <a href="http://www.rosesgiftideas.com/about-us.html" class="bottom_link" title="About Home Independent Consultant">About Us</a> | <a href="https://ic.longaberger.com/esuite/control/loadEnrollmentPersonalInformation" class="bottom_link" title="Become a Roses Gift Ideas">Become a Home Consultant</a> | <a href="http://ic.longaberger.com/esuite/home/rvincent/joinme" class="bottom_link" title="Join Longaberger Team">Host a Show</a> | <a href="http://www.longaberger.com/visitUs.aspx" class="bottom_link" title="Visit Longaberger Baskets">Visit Us</a> | <a href="http://static.longaberger.com/weekly_images/TLCservice.html" class="bottom_link" title="Corporate Gift Basket Service">Customer Service</a> | <a href="http://www.longaberger.com/resources/1/flyer/sept09/" class="bottom_link" title="Basket Sales Flyer">Current Sales Flyer</a> | <a href="http://www.longaberger.com/resources/1/wishlist/fall09/" class="bottom_link" title="Longaberger Online Products">Our Product Catalog</a> | <a href="factory-store.html" class="bottom_link" title="Decorative Basket Shop">Shop Factory Store</a> | <a href="homestead-store.html" class="bottom_link" title="Homestead Baskets Store">Shop Homestead Store</a> | <a href="http://www.rosesgiftideas.com/longaberger-wishlist-2009.html" class="bottom_link">Longaberger Wishlist 2009</a> | <a href="http://www.rosesgiftideas.com/blog/" class="bottom_link" title="Gift Baskets Blog">Blog</a> | <a href="links.html" class="bottom_link">Links</a> | <a href="http://www.rosesgiftideas.com/contact.html" class="bottom_link" title="Contact Roses Gift Ideas">Contact Us</a> | <a href="http://www.rosesgiftideas.com/sitemap.html" class="bottom_link" title="Sitemap For Roses Baskets">Sitemap</a></div></td>
<!--
We request you retain the full web design copyright notice below including the link to http://www.sarkis-webdesign.com
This not only gives respect to the large amount of time given freely by the designer but also helps build interest, traffic and use of template. If you cannot (for good reason) retain the full design copyright we request you at least leave in place the image Web designer - Sarkis, with linked to http://www.sarkis-webdesign.com. Good luck!
Web designer Sarkis
// -->
</tr>
</table> </td>
</tr>
</table></td>
</tr>
</table>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-9893337-1");
pageTracker._trackPageview();
} catch(err) {}</script></body>
</html>
Well, for starting you did not provide the file containing the form, so i am going to have to assume line 88 contains the values from the checked checkboxes: $nletter=empty($_REQUEST['news']) ? array() : (array) $_REQUEST['news'];
what you need to do next is create a string from this array($nletter), then append the string to the message body.
$sNLetter = "";
foreach($nletter as $item => $news)
$sNLetter .= "<br>$news<br>" ;
Now append the variable $sNLetter to your message => line 102: $message .= "Selected Newsletters: $sNLetter";
hi,
its working... wowwwwwwww
thank u dear. thanks a lot...
welcome !
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.