Jump to content


Photo

changing subject based on selection


  • Please log in to reply
3 replies to this topic

#1 aladiyat23

aladiyat23
  • Members
  • PipPipPip
  • Advanced Member
  • 39 posts
  • Locationflorida

Posted 26 July 2006 - 07:14 PM

Is it possible to change the email subject based on the selection in a drop down?

#2 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 26 July 2006 - 07:22 PM

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.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#3 aladiyat23

aladiyat23
  • Members
  • PipPipPip
  • Advanced Member
  • 39 posts
  • Locationflorida

Posted 26 July 2006 - 07:28 PM

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>


#4 ryanlwh

ryanlwh
  • Staff Alumni
  • Advanced Member
  • 511 posts

Posted 26 July 2006 - 08:15 PM

$subject = $_POST['nameOfSelection'];
Please use EDIT * 100...
Please use
or [php] * 1000...

PLEASE READ THE POSTED SOLUTIONS CAREFULLY * 1000000...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users