i having bit of problem, form created have have multiple options select different car models, problem can not see client selected because email says "vehicle make: array"
please me display list of cars have selected in email received.
edit: please note i'm noob @ code, , need assistance in fixing this. didn't code this!
if(isset($_post{'name'}) && isset($_post{'email'})&& isset($_post{'phone'}) ) {$name=$_post['name']; $surname=$_post['surname']; $phone= $_post['phone']; $email= $_post['email']; $vehiclemake=$_post['vehiclemake']; $vehiclemodel=$_post['vehiclemodel']; $yearmodel=$_post['yearmodel']; $logo=$_post['logo']; $message=$_post['message']; if (!empty($name) && !empty($email) && !empty($phone) ) {$to=''; $subject='contact form cover-worx.co.za website'; $body='name: ' . $name . "\n\n" .'surname: ' .$surname ."\n\n" .'phone number: ' .$phone ."\n\n" .'vehicle make: ' .$vehiclemake ."\n\n" .'vehicle model: ' .$vehiclemodel ."\n\n" .'year model: ' .$yearmodel ."\n\n" .'email: ' .$email ."\n\n" .'logo required yes/no: ' .$logo ."\n\n" . 'message:' . $message; $headers='from:' .$email; if ( @mail($to, $subject, $body, $headers)){ echo '<p color="#ff0000">thanks contacting us...</p>';} else { echo '<p color="#ff0000">problem server, try again later</p>';}} else{echo '<p color="#ff0000">all fields required.</p>';}} ?> <p class="span4 field"><span class="wpcf7-form-control-wrap your-phone"><select multiple="multiple" name="vehiclemake[]"> <option value="selectmodel"> select model </option> <option value="chevroletcaptiva"> chevrolet captiva </option> <option value="chevroletcorsautility"> chevrolet corsa utility </option>
this mail sends
vehicle make: array
vehicle model:
year model: 2014
you can join array implode(',', $array)
make comma separated list of array values.
Comments
Post a Comment