php - HTML Form sending arrays in email -
the problem have list of cars people can choose , have select multiple choices. email generated form displays vehicle make: array, have no way of knowing how see cars have selected.
here code:
<p class="span4 field"><span class="wpcf7-form-control-wrap your-phone"> <select multiple="multiple" name="vehiclemake">
added code:
<h2>contact form</h2><?php 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='info@cover-worx.co.za, gerhard@smonline.co.za'; $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;
Comments
Post a Comment