zero-perfoliate
zero-perfoliate

Author Topic: Select Value Capture in PHP  (Read 212 times)

Offline gandhikr

  • New PHP Members
  • Posts: 1
  • Karma: +0/-0
Select Value Capture in PHP
« on: May 26, 2010, 10:00:05 PM »
Hello,

I have this HTML form to capture and email via php script.

Can anyone plz help in providing the script.

Thanks!

Kaushal
---------------
<form method="POST" action="test.php">


<p>Course

<select name="enquiryform">
          <option>Joining Courses</option>
          <option>Franchisee</option>
          <option>Corporate Training</option>
          <option>Others</option>
          </select>

<p><input type="submit" name="submit" value="Submit">
</form>
<p>

Offline Sergey Popov

  • PHP Helpers
  • ***
  • Posts: 31
  • Karma: +0/-0
    • Freelance PHP Developer
Re: Select Value Capture in PHP
« Reply #1 on: May 27, 2010, 12:18:20 AM »
Here is the php code for your form

test.php
Code: [Select]
<?php
  
if($_POST["submit"]){
    
$msg='Course: '.htmlspecialchars($_POST["enquiryform"]);
    
mail("you@email.com","Form data",$msg);
  }
?>

Refer to php documentation or PHP Help forum for more info and for answers to your questions

 

zero-perfoliate