grahamtinley Posted January 9, 2009 Share Posted January 9, 2009 Hi folks, if someone could please tell me what I've missed, graham@tne.co.uk Having real trouble, I'm using: <select name="interest[]" multiple> <option value="Macro Space Consultancy">Macro Space Consultancy</option> <option value="Macro Space Optimisation">Macro Space Optimisation</option> <option value="Intelligent Ranging Engine">Intelligent Ranging Engine</option> <option value="Store Location Planning">Store Location Planning</option> </select> For example, however the email just says "array" against the interest field. Here's the page: <?php @require('config.php'); if(isset($_POST["send"])) { $name = $_POST["name"]; $company = $_POST["company"]; $position = $_POST["position"]; $email = $_POST["email"]; $phone = $_POST["phone"]; $msg = $_POST["msg"]; $interest = $_POST["interest"]; $referrer = $_POST["referrer"]; $other = $_POST["other"]; $vword = $_POST["vword"]; $ip = $_SERVER['REMOTE_ADDR']; // CHECK IF EMAIL IS VALID // function CheckMail($email) { if (eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\.[a-z]{2,4}$", $email)) { return true; } else { return false; } } if ((empty($email)) || (!CheckMail($email))) { echo "Sorry, your email is missing or invalid<br>"; } // CHECK IF THE FORM HAS BEEN FILLED if(empty($name)) { echo("Enter your name please<br>"); } if(empty($vword)) { echo("Please enter the verification letters"); } // IF THEY'RE ARE NOT EMPTY if(!empty($name) && !empty($email)) { if($vword != "$v_w") { echo "Wrong verification letters, please try again."; } if($vword == "$v_w") { $headers .= "From: ".$email." Subject: ".$subject.""; // WE STORE THE MESSAGE IN A VARIABLE $messageproper = "From: $name\n\n" . "Company: $company\n\n" . "Position: $position\n\n" . "Email: $email\n\n" . "Phone: $phone\n\n" . "Message: $msg\n\n" . "Interested in: $interest\n\n" . "Referrer: $referrer\n\n" . "Other Referrer: $other\n\n"; // NO SPACE THEN DOT AFTER THE LAST ITEM ABOVE ONLY A SEMI COLON // mail("$receiver", "Subject: Web Site Enquiry", $messageproper, "From: Shopper Missions"); echo( '<br> <blockquote> Thank You <strong>' . $name . '</strong>, your message was sent!!<br> <div align="center">Please click <a href="' . $homepage . '">here</a> to go back to our home page.</div> </blockquote> ' ); } } } else { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en"> <!-- HTML Source Copyright ©2007 The Net Effect (World Wide) Ltd --> <head> <title>Enquiry to WGS</title> <meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <meta name="description" content="Enquiry to WGS, Mission Manager automatically identifies your most valuable shopper missions from EPOS and website transaction data to assist in managing shopper behavior."> <meta name="keywords" content="EPOS transaction date, customer flow missions, shopper trends data"> <link rev="made" href="mailto:webmaster@tne.co.uk"> <link rel="stylesheet" href="shopper-missions.css" type="text/css" title="Shopper Missions Style Sheet"> </head> <body> <div align="center"> <table width="760" border="0" cellspacing="0" cellpadding="0"> <tr valign="bottom" bgcolor="#FFFFFF"> <td colspan="3"><a href="mailto:sales@watsongill.com"><img src="images/top-mission-value-image.gif" alt="Contact Watson Gill for more information about Shopper Missions Manager" width="760" height="193" border="0"></a></td> </tr> <tr valign="top"> <td> <div id="leftcolumn"> <div id="leftcolumn-nav"> <a href="http://www.watsongill.com/consultancy-macro-space.html">Macro Space Consultancy</a> <a href="http://www.watsongill.com/macro-space-optimisation.html">Macro Space Optimisation</a> <a href="http://www.watsongill.com/ranging-micro-space.html">Intelligent Ranging Engine</a> <a href="http://www.watsongill.com/store-location-planning.html">Store Location Planning</a> <a href="index.html">Shopper Mission Manager</a> <a href="upsell-cross-sell-manager.html">Mission Evolver</a> <a href="optimise-adjacencies.html">Adjacency Manager</a> <a href="optimise-customer-flow.html">Customer Flow Manager</a> <a href="multi-channel-shopper.html">Mission Modeller</a> </div> <h3>Consultancy Services</h3> <p>Watson Gill has been providing a wide range of project based specialist consultancy services for over a decade. <a href="consultancy-services.html">More info...</a></p> <h3>Academic Recruitment</h3> <p>Watson Gill are always looking for highly qualified and experienced staff to complement our existing teams. <a href="recruitment.html">More info...</a></p> <h3>Contact Watson Gill</h3> <p><img src="images/tel.gif" alt="Telephone" width="12" height="10" border="0" align="left">+44 (0)114 270 9111<br><img src="images/mail.gif" alt="Email" width="12" height="10" border="0" align="left"><a href="mailto:sales@watsongill.com">sales@watsongill.com</a></p> </div> </td> <td> <div id="maincontent-top"><a href="http://www.watsongill.com/"><img src="images/blue-nav-home.gif" alt="Home" width="51" height="25" border="0"></a><a href="feedback.php"><img src="images/blue-nav-contact.gif" alt="Contact Watson Gill" width="110" height="25" border="0"></a><a href="printer/home.html"><img src="images/blue-nav-print-friendly.gif" alt="Printer Friendly Page" width="114" height="25" border="0"></a><a href="http://www.watsongill.com/about-watson-gill.html"><img src="images/blue-nav-about-wgs.gif" alt="About Watson Gill" width="84" height="25" border="0"></a></div> <div id="maincontent"> <h1>Enquiry to Watson-Gill</h1> <form method="post" action="<?php $_SERVER['PHP_SELF']; ?>"> <p><input name="name" size="20" maxlength="20" type="text"> <b>Your Name</b></p> <p><input name="company" size="20" maxlength="50" type="text"> Company Name</p> <p><input name="position" size="20" maxlength="20" type="text"> Position</p> <p><input name="email" size="20" maxlength="50" type="text"> <b>Email Address</b></p> <p><input name="phone" size="20" maxlength="20" type="text"> Telephone</p> <p>Please use this section to select your area of interest or to make a general enquiry.<br><textarea cols="36" rows="5" name="msg"></textarea></p> <p><select name="interest[]" multiple> <option value="Macro Space Consultancy">Macro Space Consultancy</option> <option value="Macro Space Optimisation">Macro Space Optimisation</option> <option value="Intelligent Ranging Engine">Intelligent Ranging Engine</option> <option value="Store Location Planning">Store Location Planning</option> <option value="Shopper Mission Manager">Shopper Mission Manager</option> <option value="Mission Evolver">Mission Evolver</option> <option value="Adjacency Manager">Adjacency Manager</option> <option value="Customer Flow Manager">Customer Flow Manager</option> <option value="Mission Modeller">Mission Modeller</option> </select> </p> <p>How did you find us?<br> <select name="referrer"> <option value="Google">Google</option> <option value="MSN Live">MSN Live</option> <option value="Yahoo!">Yahoo!</option> <option value="Directory">Directory</option> <option value="Recommendation">Recommendation</option> <option value="Web Address on Business Card">Web Address on Business Card</option> <option value="Web Address on other literature">Web Address on other literature</option> <option>Other - please specify:</option> </select> <br> <input name="other" size="35" maxlength="120" type="text"> </p> <p>Please type the verification letters <strong>wgs</strong> into the box <input name="vword" maxlength="4" size="2" type="text"> <input name="send" value="Send my enquiry" type="submit"> </p> </form> </div> </td> <td><div id="rightcolumn"> <h3>Mission Manager</h3> <ul> <li>Increase Mission Value</li> <li>Increase Mission Frequency</li> <li>Retain Missions</li> <li>Create New Missions</li> </ul> <h3>And More...</h3> <ul> <li>Mission evolution</li> <li>Adjacency optimisation</li> <li>Customer Flow optimisation</li> <li>Trend forecasting</li> <li>Model the shopper population</li> <li>Predict multi channel shopper behaviour</li> </ul> <h3>Key Features...</h3> <ul> <li>Automatic EPOS data sampling</li> <li>Single channel (tactical), whole estate (strategic) and web site</li> <li>Map missions on to floor plans</li> <li>Java & intranet deployment options</li> </ul> </div></td> </tr> <tr><td colspan="3"><div id="nav-bottom"><p>[ <a href="index.html">Home Page</a> | <a href="upsell-cross-sell-manager.html">Managing Upsells & CrossSells</a> | <a href="optimise-adjacencies.html">Optimise Adjacencies</a> | <a href="optimise-customer-flow.html">Optimise Customer Flow</a> | <a href="multi-channel-shopper.html">Predict Multi-channel Shopper Demand</a> ]</p></div></td></tr> <tr><td width="760" colspan="3"> <div id="client-info"><img src="images/clients.gif" alt="" width="651" height="47" border="0"></div></td></tr> <tr valign="top"><td colspan="2"> <div id="footer"> <p><strong>Watson Gill Scientific Ltd</strong><br> 12-14 Norfolk Row, Sheffield, S1 2PA. United Kingdom</p> <div id="footersmall"><p>Registered office: Hebblethwaites, Westbrook Court, Sharrow Vale Road, Sheffield, S11 8YZ. Company No. 03000893</p></div> <p>©2007 Watson Gill Scientific Ltd - <a href="http://www.tne.co.uk/">Website Design</a> by The Net Effect</p></div></td> <td><div id="footer-right"><p>T: 0114 270 9111<br>E:<a href="mailto:sales@watsongill.com">sales@watsongill.com</a></p></div></td> </tr> </table> </div> </body> </html> <?php } ?> Quote Link to comment Share on other sites More sharing options...
Mark Baker Posted January 9, 2009 Share Posted January 9, 2009 Gods, try reading up on arrays at least for five minutes before posting your plea for help. $interest = implode(", ", $interest); Quote Link to comment Share on other sites More sharing options...
grahamtinley Posted January 9, 2009 Author Share Posted January 9, 2009 Gods, try reading up on arrays at least for five minutes before posting your plea for help. $interest = implode(", ", $interest); Thanks for that Mark, on using your suggestion, I know get an error message: Warning: implode() [function.implode]: Bad arguments. in /home/shopper-missions/www/feedback.php on line 11 Quote Link to comment Share on other sites More sharing options...
Mark Baker Posted January 9, 2009 Share Posted January 9, 2009 So what does $_POST["interest"] actually contain? Quote Link to comment Share on other sites More sharing options...
grahamtinley Posted January 10, 2009 Author Share Posted January 10, 2009 So what does $_POST["interest"] actually contain? Hi again Mark, As per my first post: <select name="interest[]" multiple> <option value="Macro Space Consultancy">Macro Space Consultancy</option> <option value="Macro Space Optimisation">Macro Space Optimisation</option> <option value="Intelligent Ranging Engine">Intelligent Ranging Engine</option> <option value="Store Location Planning">Store Location Planning</option> <option value="Shopper Mission Manager">Shopper Mission Manager</option> <option value="Mission Evolver">Mission Evolver</option> <option value="Adjacency Manager">Adjacency Manager</option> <option value="Customer Flow Manager">Customer Flow Manager</option> <option value="Mission Modeller">Mission Modeller</option> </select> hih. 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.