Vivid Lust Posted January 5, 2008 Share Posted January 5, 2008 Here are the codes that i wrote: <!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> <title>Web Design Survey</title> <style> body{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; text-align: center; background: #b5d6ff; } #diva{ background: #fff; margin: auto; text-align: left; width: 580px; } #div{ background: #fff; margin: auto; text-align: left; width: 550px; } </style> </style> </head> <body> <div id="diva"> <div id="div"> <br><br><p><b><center>If you are not here to seriously and truthuly answer this survey then please fuck off; this will not be tolerated. This survey is for the market research of a web design company.</center> </b></p><br><br> <form id="form1" name="form1" method="post" action="surveyx.php"> <label>Name:<br /> <input type="text" name="name" id="name" /><br /> </label> <label>Age:<br /> <input type="text" name="age" id="age" /><br /> </label> <label>Email:<br /> <input type="text" name="email" id="email" /> <br /> <br /> How much would you spend for a custom website that has a contnent management system?<br /> <input type="text" name="much" id="much" /> <br /> <br /> What time scale would you want your website to be made in?<br /> <input type="text" name="time" id="time" /> <br /> <br /> What way would you prefer to pay for your site?<br /> <select name="pay" id="pay"> <option value="Credit Card">Credit Card</option> <option value="Paypal">Paypal</option> <option value="Invoice">Invoice</option> <option value="Other">Other</option> </select> <br /> <br /> What type of site would appeal to you most to hire a web designer from?<br /> <textarea name="appeal" id="appeal" cols="45" rows="5"></textarea> <br /> <br /> What type of service would you expect from a web design company?<br /> <textarea name="service" id="service" cols="45" rows="5"></textarea> <br /> <br /> What features would you expect your site to have when made? <br /> <textarea name="features" id="features" cols="45" rows="5"></textarea> <br /> <br /> Please add any other comments you have to do with hiring a web designer<br /> <textarea name="other" id="other" cols="45" rows="5"></textarea> <br /> <br /> <center><input type="submit" name="submit" id="submit" value="Submit" /></center> <br /> <br /> </label> </form> </div> </div> </body> </html> <?php $name = $_POST['name']; $age = $_POST['age']; $email = $_POST['email']; $much = $_POST['much']; $time = $_POST['time']; $pay = $_POST['pay']; $appeal = $_POST['appeal']; $service = $_POST['service']; $features = $_POST['features']; $other = $_POST['other']; $msg1 = "Survey sent from $name , aged $age at $email <br>"; $msg = "$name would spend $much on hiring a web designer. The time frame expected would be $time . The payment method would be: $pay <br> "; $msg3 = "The following site would appeal to $name<br><br> $appeal<br><Br> The service expected would be: <br><br> $service<br><br> The features expected are: <br><br> $features <br><br> Other Comments: <Br><br> $other <br><br><br>END OF MESSAGE"; $message = $msg1.$msg.$msg3; $to = "stainerjacob@yahoo.co.uk"; $subject = "Survey has been done"; $from = "stainerjacob@yahoo.co.uk"; mail("stainerjacob@yahoo.co.uk, $subject, $message, $from); ?> <head> <title>Web Design Survey</title> <style> body{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 11px; text-align: center; background: #b5d6ff; } #diva{ background: #fff; margin: auto; text-align: left; width: 580px; } #div{ background: #fff; margin: auto; text-align: left; width: 550px; } </style> </style> </head> <body> <div id="diva"> <div id="div"><br><br> <center>Thank you <?php echo( $name ); ?>, your submission was successful!</center> <br><br></div> </body> The problem is, is that i do not recieve the email. Please help! Help would be much apreciated!! Thanks again. Vivid Quote Link to comment https://forums.phpfreaks.com/topic/84646-php-mail-problems-wont-recieve-email/ Share on other sites More sharing options...
john010117 Posted January 5, 2008 Share Posted January 5, 2008 First of all, make sure your server has a mail server installed. Quote Link to comment https://forums.phpfreaks.com/topic/84646-php-mail-problems-wont-recieve-email/#findComment-431358 Share on other sites More sharing options...
toplay Posted January 5, 2008 Share Posted January 5, 2008 change this: mail("stainerjacob@yahoo.co.uk, $subject, $message, $from); to this: mail("stainerjacob@yahoo.co.uk", $subject, $message, $from); or mail($to, $subject, $message, $from); Turn on error reporting and display errors so you see PHP syntax issues. Quote Link to comment https://forums.phpfreaks.com/topic/84646-php-mail-problems-wont-recieve-email/#findComment-431359 Share on other sites More sharing options...
Vivid Lust Posted January 5, 2008 Author Share Posted January 5, 2008 How? Quote Link to comment https://forums.phpfreaks.com/topic/84646-php-mail-problems-wont-recieve-email/#findComment-431360 Share on other sites More sharing options...
john010117 Posted January 5, 2008 Share Posted January 5, 2008 error_reporting(E_ALL); turns the error reporting on. Put that at the very top of your script. Quote Link to comment https://forums.phpfreaks.com/topic/84646-php-mail-problems-wont-recieve-email/#findComment-431361 Share on other sites More sharing options...
Vivid Lust Posted January 5, 2008 Author Share Posted January 5, 2008 I did all that, there are no errors with the script. All works perfectly. BUT, i dont recieve an email, and yes my address is correct. Quote Link to comment https://forums.phpfreaks.com/topic/84646-php-mail-problems-wont-recieve-email/#findComment-431368 Share on other sites More sharing options...
Vivid Lust Posted January 5, 2008 Author Share Posted January 5, 2008 First of all, make sure your server has a mail server installed. How ??? Quote Link to comment https://forums.phpfreaks.com/topic/84646-php-mail-problems-wont-recieve-email/#findComment-431370 Share on other sites More sharing options...
john010117 Posted January 5, 2008 Share Posted January 5, 2008 Contact your host. Quote Link to comment https://forums.phpfreaks.com/topic/84646-php-mail-problems-wont-recieve-email/#findComment-431373 Share on other sites More sharing options...
Vivid Lust Posted January 5, 2008 Author Share Posted January 5, 2008 Well, my host has cpanel with all mail things like email accounts, Etc. ... Quote Link to comment https://forums.phpfreaks.com/topic/84646-php-mail-problems-wont-recieve-email/#findComment-431386 Share on other sites More sharing options...
Vivid Lust Posted January 5, 2008 Author Share Posted January 5, 2008 I used a web host email address like. survey@myaddy.myhost.com And it worked, maybe yahoo is blocking it? ??? Quote Link to comment https://forums.phpfreaks.com/topic/84646-php-mail-problems-wont-recieve-email/#findComment-431401 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.