bloodlinek0 Posted October 17, 2009 Author Share Posted October 17, 2009 It is picking up the value because if I echo the results it shows in the confirmation page I just can't get it to display in the email. Quote Link to comment Share on other sites More sharing options...
bloodlinek0 Posted October 17, 2009 Author Share Posted October 17, 2009 Okay it may be easier to do it this way: This is my current php code that is not working...if you can see what I need to change and specifically tell me what it is and where it goes in the script, I'll probably be able to figure out backwards how it works. <?php /* Subject and Email Variables */ $emailSubject = 'ITMB Form Submission'; $webMaster = 'bloodlinek0@yahoo.com'; /*Gathering Data Varialbes */ $forename = $_POST['forename']; $company = $_POST['company']; $position = $_POST['position']; $address = $_POST['address']; $city = $_POST['city']; $potscode = $_POST['postcode']; $telephone = $_POST['telephone']; $email = $_POST['email']; $businessmobiles = $_POST['businessmobiles']; $blackberrysolutions = $_POST['blackberrysolutions']; $other = $_POST['other']; $timescale = $_POST['timescale']; $comments = $_POST['comments']; $body = <<<EOD <br><hr><br> Name: $forename <br> Company: $company <br> Postion: $position <br> Address: $address <br> City: $city <br> Postcode: $postcode <br> Telephone: $telephone <br> Email: $email <br> Business Mobiles: $businessmobiles <br> Blackberry Solutions: $blackberrysolutions <br> Other: $other <br> Timescale: $timescale <br> Comments: $comments <br> EOD; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=us-ascii\r\n"; mail($webMaster, $emailSubject, $body, $headers); /*Results Rendered as html*/ $theResults = <<<EOD <html> <head> <meta name="description" content="" /> <meta name="keywords" content="" /> <meta name="author" content="Dazan Alyanai" /> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" /> <title>ITMB</title> <link rel="shortcut icon" HREF="favicon.ICO"> <script type="text/javascript" src="assets/flash/swfobject.js"></script> <script type="text/javascript"> var flashvars = {}; var params = {}; params.menu = "false"; params.quality = "best"; params.scale = "noscale"; var attributes = {}; swfobject.embedSWF("assets/flash/logo.swf", "logo", "341", "86", "9.0.0", "assets/flash/expressInstall.swf", flashvars, params, attributes); </script> <link rel="stylesheet" type="text/css" href="styles.css"> <style type="text/css"> <!-- --> </style> </head> <body> <div id="wrapper"> <div id="head"> <div id="nav" style="float: right"> <ul> <li class="link"><a href="index.html">Home</a></li> <li class="link"><a href="about.html">About Us</a></li> <li class="link"><a href="web.html">Web</a></li> <li class="link"><a href="plans.html">Plans</a></li> <li class="link"><a href="partnerships.html">Partnerships</a></li> <li class="link" id="active"><a href="contact.html">Contact</a></li> </u> </div> <div id="logo"> <img src="assets/images/logo.gif" alt="ITMB" /> </div> </div> <!--Flash Banner--> <div id="banner"> <img src="assets/images/contact_banner.jpg" /> </div> <!--Row 1 Header Content (About Us..)--> <div id="content_top"> <img src="assets/images/thank_you.gif" alt="Thank You"> </div> <!--Content--> <div class="text_only" style="height: 220px"> <img src="assets/images/tick.jpg" alt="Tick" style="float: left; padding: 20px 20px 0 20px"/> <h4>Thank You for your submission.</h4> <h4>Your request will be dealt with as soon as possible and one of our representatives will contact you shortly.</h4> <p>Return to the <a href="index.html" class="standlink">Home Page</a></p> </div> <!--Footer--> <br> <img src="assets/images/networks.jpg" alt="Networks" style="margin-left: 750px" /> <div id="footer"> <address>ITMB | Copyright 2009 | All Rights Reserved</address><address style="float: left"><a class="standlink" href="index.html">ITMB</a> Registered Company Number: 06925752</address> </div> </body> </html> EOD; echo "$theResults"; ?> Quote Link to comment Share on other sites More sharing options...
cags Posted October 17, 2009 Share Posted October 17, 2009 At a glance there seems nothing up with that code, assuming the HTML form that goes with it is correct it should work. Quote Link to comment Share on other sites More sharing options...
bloodlinek0 Posted October 17, 2009 Author Share Posted October 17, 2009 The html code can be fond at: http://experiment.treadeverywhere.com/itmb/contact.html It should be fine as all the other fields are working ok. Regards Quote Link to comment Share on other sites More sharing options...
cags Posted October 17, 2009 Share Posted October 17, 2009 As suspected the issue is with a difference between your HTML and your PHP. You have name="Timescale" in your HTML and you are using $_POST['timescale'] in your PHP (array keys are case sensitive). Thi is something that you should have been able to pickup by looking at the output from print_r($_POST) as the array key would have been differen't to what you were calling in PHP. Quote Link to comment Share on other sites More sharing options...
bloodlinek0 Posted October 17, 2009 Author Share Posted October 17, 2009 Perfect. Thanks for your expertise. 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.