Jump to content

Archived

This topic is now archived and is closed to further replies.

aladiyat23

changing subject based on selection

Recommended Posts

yes, very easy actually
just have the drop down
and have different choices, select the variable
$message to different things, then when the mail is sent, message will be different depending on what was set to the variable.

Share this post


Link to post
Share on other sites
sorry, i dont follow it as easily as I'm sure it is...

for an example... here are samples of my $message script and my selection...

if ($_SERVER['REQUEST_METHOD']=="POST"){

   $to = "@gmail.com";
   $subject = "Data Request";
   $email = $_POST['requiredemail'];
   $address = $_POST['requiredaddress'];
   $zip = $_POST['requiredzip'];
   $headers = "From: $email \r\n";

  $message = "
   From: $email\n
   Address: $address\n
   Zip: $zip\n";

<select >
  <option>Select One</option>
  <option value="D,tb1^E,tb2">Counts</option>
  <option value="D,tb2^E,tb1">Orders</option>
</select>

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.