MoSachy Posted February 22, 2018 Share Posted February 22, 2018 Please help, I've looked at other peoples similar issues yet they do not seem to fix mine. I can't troubleshoot the PHP mistake I apparently made... Basically the email is blank once it is submitted, whatever is entered in the fields is not translated into the email. What am i doing wrong? The site is hosted by GoDaddy if that helps. I receive the email and it looks like the following : Once I know for a fact that the emails are not blank I'm change the forwarding email to admin@expresswayship.com from my email (mohamadt_99@yahoo.com) Forgive me for it's been a while since I've posted anything on a forum. HERE IS MY PHP FILE CALLED "contact3.php" <?php $webMaster = 'mohamadt_99@yahoo.com'; $emailSubject = 'Shipping Quote Request'; /* Gathering Data Variables */ $pickupField = $_POST['pickup']; $dropoffField = $_POST['dropoff']; $yearField = $_POST['year']; $makeField = $_POST['make']; $modelField = $_POST['model']; $runningField = $_POST['running']; $nonrunningField = $_POST['nonrunning']; $nameField = $_POST['name']; $emailField = $_POST['email']; $body = <<<EOD <br><hr><br> PickUp: $pickup <br> Drop Off: $dropoff <br> Year: $year <br> Make: $make <br> Model: $model <br> Running: $running <br> Non-Running: $nonrunning <br> Name: $name <br> Email: $email <br> EOD; $headers = "from: $email\r\n"; $headers .= "content-type: text/html\r\n"; $success = mail($webMaster, $emailSubject, $body, $headers); /* Results rendered as HTML*/ $theResults = <<<EOD <html> <head> <meta charset="UTF-8"> <title>Expressway Ship</title> <link rel="stylesheet" href="css/styles.css" type="text/css" /> </head> <body> <div id="header"> <div class="area"> <div id="logo"> <a href="index.html"><img src="images/logo.png" alt="LOGO" /></a> </div> <ul id="navigation"> <li> <a href="index.html"><strong>HOME</strong></a> </li> <li> <a href="about.html"><strong>ABOUT US</strong></a> </li> <li> <a href="faq.html"><strong>F A Q</strong></a> </li> <li> <a href="contact.html"><strong>CONTACT</strong></a> </li> </ul> </div> </div> <div id="contents"> <div id="adbox"> </div> <div class="area"> <div class="main"> <img src="images/bar1.png" alt="Img" /><br><br> <h2><img src="images/delivery.png" alt="Img" height="25" width="25" /> Fully Coordinated Vehicle Shipping Processs</h2> <p> We take care of all the leg work for you. One call to Expressway Auto Ship, Inc. is all it takes to get the job done. </p> <h2><img src="images/umbrella.png" alt="Img" height="25" width="25" /> Licensed, Bonded & Insured for Piece of Mind</h2> <p> Insurance coverage is included in your shipping quote. Our selected haulers must meet insurance standards before qualifying to be part of our team of carriers and network. If anything should go wrong, we are prepared to make it right for you and your vehicles as quick as we can. </p> <h2><img src="images/personal.png" alt="Img" height="25" width="25" /> Full Dispatch Team & Department</h2> <p> Our experienced, dispatch team is ready to work with you and help make your car shipping experience, perfect. </p> <h2><img src="images/towtruck.png" alt="Img" height="25" width="25" /> Door-to-door Pick-up and Delivery Service</h2> <p> Moving is enough of a hassle to begin with. We make things a little easier by saving you an out-of-the-way trip to the car depot. Instead, simply get your vehicle picked up by a member of our friendly staff, and have it waiting for you at your new destination, as soon as it arrives. </p> <h2><img src="images/track.png" alt="Img" height="25" width="25" /> Custom Solutions for All Vehicles and Situations</h2> <p> Economy cars, SUVs, boats, motorcycles, and exotic sports cars—we take care of it all! No matter your vehicle shipping needs, we'll help create a solution to get you there. </p> </div> <div class="blog"> <h2>SHIP ESTIMATE</h2> <div> <form method="post" action="contact2.php" enctype="text/plain"> <fieldset> <input name="pickup" placeholder=" Pickup Zip Code"/><br /><br /> <input name="dropoff" placeholder=" Drop Off Zip Code"/><br /><br /> <input name="year" placeholder=" Vehicle Year"/><br /><br /> <input name="make" placeholder=" Vehicle Make"/><br /><br /> <input name="model" placeholder=" Vehicle Model"/><br /><br /> <p><input type="radio" name="running"/>Running <input type="radio" name="running"/>Non-Running</p> <br /> <input name="name" placeholder=" Customers Name"/><br /><br /> <input name="email" placeholder=" Email Address"/><br /><br /> <p>THANK YOU</p><br /><br /> </fieldset> </form> <img src="images/sidebar04.png" /> </div> </div> </div> </div> <div id="footer"> <span class="divider"></span> <div class="area"> <div id="connect"> <a href="https://www.fmcsa.dot.gov/"><img src="images/fmcsalogo.png" alt="Img" height="40" width="40" /></a> <a href="https://www.bbb.org/"><img src="images/bbblogo.png" alt="Img" height="40" width="40" /></a> <a href="https://www.facebook.com/"><img src="images/facebooklogo.png" alt="Img" height="40" width="40" /></a> <a href="https://www.instagram.com/"><img src="images/instagramlogo.png" alt="Img" height="40" width="40" /></a> </div> <p> Copyright © 2018 Expressway Ship. All Rights Reserved. Site Created by <a href="mailto:mohamadt_99@yahoo.com">-= Mo =-</a> </p> </div> </div> </body> </html> EOD; echo "$theResults"; ?> AND HERE IS MY HTML FILE "index.html" <!DOCTYPE HTML> <html> <head> <meta charset="UTF-8"> <title>Expressway Ship</title> <link rel="stylesheet" href="css/styles.css" type="text/css" /> </head> <body> <div id="header"> <div class="area"> <div id="logo"> <a href="index.html"><img src="images/logo.png" alt="LOGO" /></a> </div> <ul id="navigation"> <li> <a href="index.html"><strong>HOME</strong></a> </li> <li> <a href="about.html"><strong>ABOUT US</strong></a> </li> <li> <a href="faq.html"><strong>F A Q</strong></a> </li> <li> <a href="contact.html"><strong>CONTACT</strong></a> </li> </ul> </div> </div> <div id="contents"> <div id="adbox"> </div> <div class="area"> <div class="main"> <img src="images/bar1.png" alt="Img" /><br><br> <h2><img src="images/delivery.png" alt="Img" height="25" width="25" /> Fully Coordinated Vehicle Shipping Processs</h2> <p> We take care of all the leg work for you. One call to Expressway Auto Ship, Inc. is all it takes to get the job done. </p> <h2><img src="images/umbrella.png" alt="Img" height="25" width="25" /> Licensed, Bonded & Insured for Piece of Mind</h2> <p> Insurance coverage is included in your shipping quote. Our selected haulers must meet insurance standards before qualifying to be part of our team of carriers and network. If anything should go wrong, we are prepared to make it right for you and your vehicles as quick as we can. </p> <h2><img src="images/personal.png" alt="Img" height="25" width="25" /> Full Dispatch Team & Department</h2> <p> Our experienced, dispatch team is ready to work with you and help make your car shipping experience, perfect. </p> <h2><img src="images/towtruck.png" alt="Img" height="25" width="25" /> Door-to-door Pick-up and Delivery Service</h2> <p> Moving is enough of a hassle to begin with. We make things a little easier by saving you an out-of-the-way trip to the car depot. Instead, simply get your vehicle picked up by a member of our friendly staff, and have it waiting for you at your new destination, as soon as it arrives. </p> <h2><img src="images/track.png" alt="Img" height="25" width="25" /> Custom Solutions for All Vehicles and Situations</h2> <p> Economy cars, SUVs, boats, motorcycles, and exotic sports cars—we take care of it all! No matter your vehicle shipping needs, we'll help create a solution to get you there. </p> </div> <div class="blog"> <h2>SHIP ESTIMATE</h2> <div> <form method="post" action="contact3.php"> <input name="pickup" id="pickup" placeholder=" Pickup Zip Code"/><br /><br /> <input name="dropoff" id="dropoff" placeholder=" Drop Off Zip Code"/><br /><br /> <input name="year" id="year" placeholder=" Vehicle Year"/><br /><br /> <input name="make" id="make" placeholder=" Vehicle Make"/><br /><br /> <input name="model" id="model" placeholder=" Vehicle Model"/><br /><br /> <p><input type="radio" name="running" id="running"/>Running <input type="radio" name="nonrunning" id="nonrunning"/>Non-Running</p> <br /> <input name="name" id="name" placeholder=" Customers Name"/><br /><br /> <input name="email" id="email" placeholder=" Email Address"/><br /><br /> <input name="submit" id="submit" class="btn" type="submit" value="Submit Quote Request"/><br /><br /> <input name="reset" id="reset" class="btn" type="reset" value="Reset Form"/> </form> <br /> <img src="images/sidebar04.png" /> </div> </div> </div> </div> <div id="footer"> <span class="divider"></span> <div class="area"> <div id="connect"> <a href="https://www.fmcsa.dot.gov/"><img src="images/fmcsalogo.png" alt="Img" height="40" width="40" /></a> <a href="https://www.bbb.org/"><img src="images/bbblogo.png" alt="Img" height="40" width="40" /></a> <a href="https://www.facebook.com/"><img src="images/facebooklogo.png" alt="Img" height="40" width="40" /></a> <a href="https://www.instagram.com/"><img src="images/instagramlogo.png" alt="Img" height="40" width="40" /></a> </div> <p> Copyright © 2018 Expressway Ship. All Rights Reserved. Site Created by <a href="mailto:mohamadt_99@yahoo.com">-= Mo =-</a> </p> </div> </div> </body> </html> Please educate me! I'm stumped! Thank you for your time. -= Mo =- Quote Link to comment Share on other sites More sharing options...
requinix Posted February 22, 2018 Share Posted February 22, 2018 You're stumped? You really can't see what the problem is? Really really? Here's my advice: step away from your computer for a bit. Get some food. Take a nap. Watch some TV. I don't know but something that isn't with your computer. Half an hour or so. Then come back and take a second look at your code. 1 Quote Link to comment Share on other sites More sharing options...
fatkatie Posted February 22, 2018 Share Posted February 22, 2018 hahahh.... I do that ALL the time!!!! I use beer! Quote Link to comment Share on other sites More sharing options...
dalecosp Posted February 23, 2018 Share Posted February 23, 2018 hahahh.... I do that ALL the time!!!! I use beer! Well, go drink it in the "field", and leave the "field" outside ... ? 1 Quote Link to comment Share on other sites More sharing options...
benanamen Posted February 23, 2018 Share Posted February 23, 2018 The step away works every time. I just had to do it as recent as last night. Quote Link to comment Share on other sites More sharing options...
dodgeitorelse3 Posted February 23, 2018 Share Posted February 23, 2018 Just compare lines 8-16 to lines 20-28 of your code posted above for contact3.php. Quote Link to comment Share on other sites More sharing options...
gizmola Posted February 24, 2018 Share Posted February 24, 2018 Clearly this is a case of PEBKAC -> "Problem exists between keyboard and chair" $pickupField = $_POST['pickup']; // A few lines later... $body = <<<EOD <br><hr><br> PickUp: $pickup <br> Things like var_dump() are real helpful in these situations. Quote Link to comment Share on other sites More sharing options...
MoSachy Posted February 25, 2018 Author Share Posted February 25, 2018 LOL, that will teach me to stock the fridge. thank you guys, I guess late night sessions and no beer don't mix, thank you again! 1 Quote Link to comment Share on other sites More sharing options...
taquitosensei Posted February 26, 2018 Share Posted February 26, 2018 (edited) LOL, that will teach me to stock the fridge. thank you guys, I guess late night sessions and no beer don't mix, thank you again! Definitely needed a CASE of beer. Edited February 26, 2018 by taquitosensei 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.