Jump to content

php mail() from Dropdown or Checkbox Value


farnoise

Recommended Posts

Hi Everyone,

I'm making a form but this form doesnt have default destination email address. I need to send the information of the form to who that it blongs to

 

<input name="Support" type="checkbox" id="necho" value="[email protected]"/>
Customer Support
<input name="Sale" type="checkbox" id="etc" value="[email protected]">
Sale Dep.
              </div>

 

So when they check support form sends the support value that is its email address to my PHP proccessor as $support

if they check sale it'll send $sale value to my PHP and here is my PHP function

 

mail($support, $header, $message, "From: Client <[email protected]>");
mail($sale, $headerg, $message, "From: Client <[email protected]>");

 

 

Anyway! It's not working for some reason!!!!! :D Anybody can direct me??? PLZ

 

Thank u all

I'd not include the actual email address within the form (for spam reasons) if I were you. Instead just set the check box value to true and check within your PHP code if they have checked sales/support and send accordingly. Without being able to see the bulk of the code, are you correctly setting the $support / $sales vars?

mail($support, $header, $message, "From: Client <[email protected]>");

mail($sale, $headerg, $message, "From: Client <[email protected]>");

 

Could you show the code where these variables are declared? Also echo them out and check they are the values you're expecting.

Archived

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

×
×
  • Create New...

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.