Hello, I have the below mentioned form. I wish to collect responses by email. I have 7 separate regions. 1) Mumbai 2) Delhi 3) Chennai 4) Bangalore 5) Hyderabad 6) Kolkata 7) Pune. Each region has their separate emailID on which they would like to collect the responses. The form has regions in the drop down. The person filling the form should select one of the 7 regions. I wish to have PHP code which can process the below form. The script should be able to send emails as under: Mumbai -> mumbai@example.com Delhi -> Delhi@example.com Chennai -> Chennai@example.com Bangalore -> Bangalore@example.com Hyderabad -> Hyderabad@example.com Kolkata -> Kolkata@example.com Pune -> Pune@example.com I shall be highly obliged if someone can provide me the script Thanks a million in advance KG ------------------------FORM ---------------------- <form action="#" method="#" name="form1"> <label for="name">Name:</label><input name="name" type="text" id="name" /><br /><br /> <label for="email">Email:</label><input name="email" type="text" id="email" /><br /><br /> <label for="phone">Phone:</label><input name="phone" type="text" id="phone" /><br /><br /> <label for="qual">Qualification:</label><select name="qual"> <option>BE/ BTECH</option> <option>ME/ MTECH</option> <option>BCA</option> <option>BSc-IT</option> <option>MSc – IT</option> <option>MCA</option> <option>Diploma – IT</option> <option>Others</option> </select><br /><br /> <label for="doing">What are you <br />currently doing?</label><select name="doing"> <option>Pursuing 1 year</option> <option>Pursuing 2 year</option> <option>Pursuing 3 year</option> <option>Pursuing 4 year</option> <option>Graduate/ PG seeking Job</option> <option>Working Professional</option> <option>Pursuing PG</option> </select><br /><br /> <label for="cmccentre">Preferred CMC Centre:</label><select name="cmccentre"> <option>Mumbai</option> <option>Delhi</option> <option>Chennai</option> <option>Bangalore</option> <option>Hyderabad</option> <option>Kolkata</option> <option>Pune</option> </select><br /><br /> <label for="query">Query:</label><textarea name="query" cols="25" rows="5" id="query"></textarea><br /><br /> <input name="coursename" type="hidden" value="CJET" /> <input name="leadsourse" type="hidden" value="WebSite" /> <input name="submit1" type="submit" class="submit" onclick="MM_validateForm('name','','R','email','','RisEmail','phone','','RisNum','query','','R');return document.MM_returnValue" value="Get More Info about CJet Program!!" /> -------------------------
You will need only a few things for this to do it your self. You will have to accept the POST -s and put them into variables Then you will need a switch, which will determin the senders address by the given "cmccentre" option value: http://php.net/manual/en/control-structures.switch.php Next is the PHP mailer function. Its really easy and simple to use: http://php.net/manual/en/function.mail.php See the whole picture here: http://php.about.com/od/phpapplications/ss/form_mail.htm Cheers,