farnoise Posted December 11, 2009 Share Posted December 11, 2009 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!!!!! Anybody can direct me??? PLZ Thank u all Quote Link to comment https://forums.phpfreaks.com/topic/184765-php-mail-from-dropdown-or-checkbox-value/ Share on other sites More sharing options...
Adam Posted December 11, 2009 Share Posted December 11, 2009 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? Quote Link to comment https://forums.phpfreaks.com/topic/184765-php-mail-from-dropdown-or-checkbox-value/#findComment-975402 Share on other sites More sharing options...
farnoise Posted December 11, 2009 Author Share Posted December 11, 2009 No Idea man, Can u gimme an example!? Quote Link to comment https://forums.phpfreaks.com/topic/184765-php-mail-from-dropdown-or-checkbox-value/#findComment-975403 Share on other sites More sharing options...
Adam Posted December 11, 2009 Share Posted December 11, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/184765-php-mail-from-dropdown-or-checkbox-value/#findComment-975406 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.