Guest Starko Posted June 30, 2006 Share Posted June 30, 2006 Below is the code for the form, i have added the headers so i can send the form to more than one person, and now it won't send at all.It is online at www.elliotsestateagents.co.uk/admin/sale.phpCan anyone help?[code]<?PHPif (isset($_POST['send'])) {$IDNumber = $_POST['IDNumber'];$NegotiatorName = $_POST['NegotiatorName'];$SiteCode = $_POST['SiteCode'];$VendorsSolicitors = $_POST['VendorsSolicitors'];$PurchasersSolicitors = $_POST['PurchasersSolicitors'];$FullChain = $_POST['FullChain'];$Notes = $_POST['Notes'];$to_email = "Sales Progressors <test@elliotsestateagents.co.uk>" . ", " ; // Note the dot!$subject = "New Sale";$headers = "From: $NegotiatorName <$email>\r\n"; /* message body */$body = "A new sale has occured, below are all of the details:";$body .= "________________________________________\n\n" ;$body .= "From: ".$NegotiatorName .". " . $name ." \n";$body .= "ID Number: ".$IDNumber."\n";$body .= "Negotiator Name: ".$NegotiatorName."\n";$body .= "Site Code: ".$SiteCode."\n";$body .= "Finance: ".$Finance."\n";$body .= "Items: ".$Items."\n";$body .= "Full Chain: ".$FullChain."\n";$body .= "Vendors Solicitors: ".$VendorsSolicitors."\n";$body .= "Purchasers Solicitors: ".$PurchasersSolicitors."\n";$body .= "Notes: ".$Notes."\n";$body .= "________________________________________\n\n" ;mail($to_email,$subject,$body,$headers);}?>[/code][code]<?PHP if (isset($_POST['send'])) { echo "<p><strong>Thank you for sbmiting your sale. We will be in touch shortly.<strong/><br></p>";}?></p> <form name="Sale" id="Sale" method="post" action=""> <table border="0" align="left" cellpadding="2" cellspacing="2"> <tr class="body"> <td><div align="right"></div> <p>ID Number:<br /> <input name="IDNumber" type="text" id="IDNumber" size="40" maxlength="40" /> </p> <p>Negotiator Name:<br> <input name="NegotiatorName" type="text" id="NegotiatorName" size="40" maxlength="40" /></p> <p> </p> </td> </tr> <tr class="body"> <td>Notes:<br /> <textarea name="Notes" cols="30" rows="4" id="Notes" style="scrollbar-base-color:blue;scrollbar-arrow-color:#990000;"></textarea></td> </tr> <tr class="body"> <td><input name="Submit" type="submit" class="forms" style="background-color:blue; color:#FFFFFF; border-color:#FF0000" value="Submit"/> <input name="send" type="hidden" id="send" value="send" /></td>[/code] Quote Link to comment Share on other sites More sharing options...
Orio Posted June 30, 2006 Share Posted June 30, 2006 Try changing this part:[code]$to_email = "Sales Progressors <test@elliotsestateagents.co.uk>" . ", "; // Note the dot!$subject = "New Sale";$headers = "From: $NegotiatorName <$email>\r\n";[/code]To:[code]$to_email = "Sales Progressors <test@elliotsestateagents.co.uk>" . ", "; // Note the dot!$subject = "New Sale";$headers = "From: ".$NegotiatorName." <".$email.">\r\n";[/code]And I dont see why that dot and a comma in the $to_email is there. I think you can remove it, so it'll look like this:[code]$to_email = "Sales Progressors <test@elliotsestateagents.co.uk>";[/code]Orio. Quote Link to comment Share on other sites More sharing options...
Guest starko Posted June 30, 2006 Share Posted June 30, 2006 It is online at www.elliotsestateagents.co.uk/admin/sale.php and it still doesnt work. any ideas? Quote Link to comment Share on other sites More sharing options...
Orio Posted June 30, 2006 Share Posted June 30, 2006 Try this:[code]<?PHPif (isset($_POST['send'])) {$IDNumber = $_POST['IDNumber'];$NegotiatorName = $_POST['NegotiatorName'];$SiteCode = $_POST['SiteCode'];$VendorsSolicitors = $_POST['VendorsSolicitors'];$PurchasersSolicitors = $_POST['PurchasersSolicitors'];$FullChain = $_POST['FullChain'];$Notes = $_POST['Notes'];$to_email = "test@elliotsestateagents.co.uk"$subject = "New Sale";$headers = "From: ".$NegotiatorName." <".$email.">\r\n"; /* message body */$body = "A new sale has occured, below are all of the details:";$body .= "________________________________________\n\n" ;$body .= "From: ".$NegotiatorName.". ".$name." \n";$body .= "ID Number: ".$IDNumber."\n";$body .= "Negotiator Name: ".$NegotiatorName."\n";$body .= "Site Code: ".$SiteCode."\n";$body .= "Finance: ".$Finance."\n";$body .= "Items: ".$Items."\n";$body .= "Full Chain: ".$FullChain."\n";$body .= "Vendors Solicitors: ".$VendorsSolicitors."\n";$body .= "Purchasers Solicitors: ".$PurchasersSolicitors."\n";$body .= "Notes: ".$Notes."\n";$body .= "________________________________________\n\n" ;mail($to_email,$subject,$body,$headers);}?>[/code]Orio. Quote Link to comment Share on other sites More sharing options...
Guest starko Posted June 30, 2006 Share Posted June 30, 2006 Again its at www.elliotsestateagents.co.uk/admin/sale.phpIts coming up with an error.Also i need the form to be sent to about 7 email addresses so i need the CC it?Thanks. Quote Link to comment Share on other sites More sharing options...
redarrow Posted June 30, 2006 Share Posted June 30, 2006 why this not submit?if (isset($_POST['send'])) { Quote Link to comment Share on other sites More sharing options...
Guest Starko Posted June 30, 2006 Share Posted June 30, 2006 This is all the code, but for some reason it is not sending and an error is coming up, i also need to add CC addresses.[code]<?PHPif (isset($_POST['send'])) {$IDNumber = $_POST['IDNumber'];$NegotiatorName = $_POST['NegotiatorName'];$SiteCode = $_POST['SiteCode'];$Notes = $_POST['Notes'];$to_email = "chrisstarkings@elliotsestateagents.co.uk"$subject = "New Sale";$headers = "From: ".$NegotiatorName." <".$email.">\r\n"; /* message body */$body = "A new sale has occured, below are all of the details:";$body .= "________________________________________\n\n" ;$body .= "From: ".$NegotiatorName.". ".$name." \n";$body .= "ID Number: ".$IDNumber."\n";$body .= "Negotiator Name: ".$NegotiatorName."\n";$body .= "Site Code: ".$SiteCode."\n";$body .= "Finance: ".$Finance."\n";$body .= "Items: ".$Items."\n";$body .= "Notes: ".$Notes."\n";$body .= "________________________________________\n\n" ;mail($to_email,$subject,$body,$headers);}?>[/code] Quote Link to comment Share on other sites More sharing options...
redarrow Posted June 30, 2006 Share Posted June 30, 2006 try know ok.<?PHPif (isset($_POST['send'])) {$IDNumber = $_POST['IDNumber'];$NegotiatorName = $_POST['NegotiatorName'];$SiteCode = $_POST['SiteCode'];$Notes = $_POST['Notes'];$to_email="chrisstarkings@elliotsestateagents.co.uk";$subject="New Sale";$headers="From: ".$NegotiatorName." <".$email.">\r\n"; /* message body */$body = "A new sale has occured, below are all of the details:";$body .= "________________________________________\n\n" ;$body .= "From: ".$NegotiatorName.". ".$name." \n";$body .= "ID Number: ".$IDNumber."\n";$body .= "Negotiator Name: ".$NegotiatorName."\n";$body .= "Site Code: ".$SiteCode."\n";$body .= "Finance: ".$Finance."\n";$body .= "Items: ".$Items."\n";$body .= "Notes: ".$Notes."\n";$body .= "________________________________________\n\n" ;mail($to_email,$subject,$body,$headers);}?> Quote Link to comment Share on other sites More sharing options...
redarrow Posted June 30, 2006 Share Posted June 30, 2006 you can try this ok but remember to make a backup of your own.<?PHPif (isset($_POST['send'])) {$IDNumber = $_POST['IDNumber'];$NegotiatorName = $_POST['NegotiatorName'];$SiteCode = $_POST['SiteCode'];$Notes = $_POST['Notes'];$to_email="chrisstarkings@elliotsestateagents.co.uk";$subject="New Sale";$headers = 'From: $NegotiatorName' . "\r\n" . 'Reply-To: $email' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); /* message body */$body = "A new sale has occured, below are all of the details:";$body .= "________________________________________\n\n" ;$body .= "From: ".$NegotiatorName.". ".$name." \n";$body .= "ID Number: ".$IDNumber."\n";$body .= "Negotiator Name: ".$NegotiatorName."\n";$body .= "Site Code: ".$SiteCode."\n";$body .= "Finance: ".$Finance."\n";$body .= "Items: ".$Items."\n";$body .= "Notes: ".$Notes."\n";$body .= "________________________________________\n\n" ;mail($to_email,$subject,$body,$headers);}?> Quote Link to comment Share on other sites More sharing options...
Guest starko Posted June 30, 2006 Share Posted June 30, 2006 all uploaded but still not working? Quote Link to comment Share on other sites More sharing options...
Orio Posted June 30, 2006 Share Posted June 30, 2006 Any errors given?Orio. Quote Link to comment Share on other sites More sharing options...
Guest starko Posted June 30, 2006 Share Posted June 30, 2006 no, nothing seems to work!!! 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.