aladiyat23 Posted July 26, 2006 Share Posted July 26, 2006 Is it possible to change the email subject based on the selection in a drop down? Link to comment https://forums.phpfreaks.com/topic/15732-changing-subject-based-on-selection/ Share on other sites More sharing options...
Ninjakreborn Posted July 26, 2006 Share Posted July 26, 2006 yes, very easy actuallyjust have the drop downand 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. Link to comment https://forums.phpfreaks.com/topic/15732-changing-subject-based-on-selection/#findComment-64284 Share on other sites More sharing options...
aladiyat23 Posted July 26, 2006 Author Share Posted July 26, 2006 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> Link to comment https://forums.phpfreaks.com/topic/15732-changing-subject-based-on-selection/#findComment-64287 Share on other sites More sharing options...
ryanlwh Posted July 26, 2006 Share Posted July 26, 2006 $subject = $_POST['nameOfSelection']; Link to comment https://forums.phpfreaks.com/topic/15732-changing-subject-based-on-selection/#findComment-64299 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.