# PHP Mailing Code Needing Help

**URL:** <https://forum.kirupa.com/t/php-mailing-code-needing-help/249718>\
**Category:** programming\
**Created:** [January 22, 2008, 12:15am UTC](https://forum.kirupa.com/t/php-mailing-code-needing-help/249718 "2008-01-22T00:15:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matthew\_Designs](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@Matthew\_Designs](https://forum.kirupa.com/u/Matthew_Designs)\
**Post date:** [January 22, 2008, 12:15am UTC](https://forum.kirupa.com/t/php-mailing-code-needing-help/249718/1 "2008-01-22T00:15:25Z")

</div>

HTML (SNIPPET):  
\<form action=‘process.php’ method=‘post’\>  
\<table width=‘100%’ align=‘center’ cellpadding=‘10’ cellspacing=‘0’ bgcolor=’#2B7460’’ id=‘artist’ style=“border:1px solid #888;”\>  
\<tr\>  
\<td\>\<div align=“center”\>\<span class=‘formfont style2’\>\<strong\>Distributor: \</strong\>\</span\>  
\<select name=‘distributor’\>  
\<option value=’’ selected\>-Select One-\</option\>  
\<option value=‘rickmondstd’\>Richmond Studio\</option\>  
\<option value=‘richmondctr’\>Richmond Contractor\</option\>  
\<option value=‘richmondwkshp’\>Richmond Workshop\</option\>  
\<option value=‘cville’\>Charlottesville Contractor\</option\>  
\<option value=‘sterlingstd’\>Sterling Studio\</option\>  
\<option value=‘sterlingctr’\>Sterling Contractor\</option\>  
\<option value=‘leesburgctr’\>Leesburg Contractor\</option\>  
\<option value=‘leesburgwkshp’\>Leesburg Workshop\</option\>  
\<option value=‘columbiactr’\>Columbia Contractor\</option\>  
\<option value=‘raleighctr’\>Raleigh Contractor\</option\>  
\<option value=‘charlottectr’\>Charlotte Contractor\</option\>  
\</select\>  
\</div\>\</td\>  
\</tr\>  
\<tr\>  
\<td\>\<div align=“center”\>\<span class=‘formfont style3 style1’\>Stone:\</span\>\<span class=“style6”\>&nbsp;\</span\>&nbsp;&nbsp; \<span class=‘formfont’\>  
\<select name=‘stone1’\>  
\<option value=’’ selected\>-Select One-\</option\>  
\<option value='AC\>Abrebascatta Carrara\</option\>  
\<option value=‘AB’\>Absolute Black\</option\>  
\<option value=‘ABA’\>Absolute Black Antico\</option\>  
\<option value=‘ABH’\>Absolute Black Honed\</option\>  
\<option value=‘AS’\>Aegean Spice\</option\>  
\<option value=‘AMC’\>African Multi-Color\</option\>  
\<option value=‘AM’\>Almond Mauve\</option\>  
\<option value=‘AB’\>Angola Black\</option\>  
\<option value=‘AW’\>Antique Walnut\</option\>  
\<option value=‘AB’\>Asian Bluestone\</option\>

PHP:

\<?  
$distributor = stripslashes($\_POST[‘distributor’]);  
$stone1 = stripslashes($\_POST[‘stone1’]);  
$stone2 = stripslashes($\_POST[‘stone2’]);  
$sonte3 = stripslashes($\_POST[‘stone3’]);  
$stone4 = stripslashes($\_POST[‘stone4’]);  
$stone5 = stripslashes($\_POST[‘stone5’]);  
$qty1 = stripslashes($\_POST[‘qty1’]);  
$qty2 = stripslashes($\_POST[‘qty2’]);  
$qty3 = stripslashes($\_POST[‘qty3’]);  
$qty4 = stripslashes($\_POST[‘qty4’]);  
$qty5 = stripslashes($\_POST[‘qty5’]);  
$add = stripslashes($\_POST[‘add’]);

$body =  
"Distributor: $distributor  
".  
"Stone #1: $stone1, $qty1  
".  
"Stone #2: $stone2, $qty2  
".  
"Stone #3: $sonte3, $qty3  
".  
"Stone #4: $stone4, $qty4  
".  
"Stone #5: $stone5, $qty5  
".  
"Additional Info: $add  
".

mail(“[ill\_tekneekz@yahoo.com](mailto:ill_tekneekz@yahoo.com)”, “NEW ORDER”, $body);  
if($send)  
{header( “Location: [http://www.ricklanddirect.com/](http://www.ricklanddirect.com/)” );}  
else  
{print “We encountered an error sending your mail, please notify [matthew.designs@gmail.com](mailto:matthew.designs@gmail.com)”; }  
}  
}  
?\>

If The Whole Source Is Needed Check It Out On [http://www.keofva.com/matt/orderform.html](http://www.keofva.com/matt/orderform.html)
