avatar.alex Posted August 13, 2007 Share Posted August 13, 2007 I cant figure out wats wrong with it??? <? $email = $_REQUEST['email'] ; $name = $_REQUEST['name'] ; $mappingskills = $_REQUEST['mappingskills'] ; $mapping = $_REQUEST['mapping'] ; $scripting = $_REQUEST['email'] ; $scriptingskills = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; mail( "avatar.alex@yahoo.com", "Develop App - $name", $message, $scriptingskills, $scripting, $mapping, $mappingskills, "From: $email" ); header( "Location: /index.php?id=thankyou" ); ?> Heres the error code: Warning: mail() expects at most 5 parameters, 8 given in /home/www/killako.freehostia.com/sendmail.php on line 11 Warning: Cannot modify header information - headers already sent by (output started at /home/www/killako.freehostia.com/sendmail.php:11) in /home/www/killako.freehostia.com/sendmail.php on line 12 Quote Link to comment https://forums.phpfreaks.com/topic/64733-email-help/ Share on other sites More sharing options...
Orio Posted August 13, 2007 Share Posted August 13, 2007 I think that the error is telling you everything... You supplied 8 parameters to the mail function, when it can only receive up to 5. What are you trying to mail? What does each var mean? Orio. Quote Link to comment https://forums.phpfreaks.com/topic/64733-email-help/#findComment-322812 Share on other sites More sharing options...
avatar.alex Posted August 13, 2007 Author Share Posted August 13, 2007 I think that the error is telling you everything... You supplied 8 parameters to the mail function, when it can only receive up to 5. What are you trying to mail? What does each var mean? Orio. Application for my game? Quote Link to comment https://forums.phpfreaks.com/topic/64733-email-help/#findComment-322813 Share on other sites More sharing options...
Orio Posted August 13, 2007 Share Posted August 13, 2007 Can explain better? What $mapping for an example? How do you want the email to look like? Check the mail() function in php.net, maybe you will find your answer there. Orio. Quote Link to comment https://forums.phpfreaks.com/topic/64733-email-help/#findComment-322814 Share on other sites More sharing options...
reages Posted August 13, 2007 Share Posted August 13, 2007 just as what Orio said. maybe what you mean/want is: mail( "avatar.alex@yahoo.com", "Develop App - $name, $message, $scriptingskills, $scripting, $mapping, $mappingskills", "From: $email" ); ofcourse you'd have to format the message part of mail() to something easier to understand. regards. Quote Link to comment https://forums.phpfreaks.com/topic/64733-email-help/#findComment-322817 Share on other sites More sharing options...
reages Posted August 13, 2007 Share Posted August 13, 2007 woopsie... what i meant was: mail( "avatar.alex@yahoo.com", "Develop App - $name", "$message, $scriptingskills, $scripting, $mapping, $mappingskills", "From: $email" ); regards. Quote Link to comment https://forums.phpfreaks.com/topic/64733-email-help/#findComment-322826 Share on other sites More sharing options...
avatar.alex Posted August 13, 2007 Author Share Posted August 13, 2007 Can explain better? What $mapping for an example? How do you want the email to look like? Check the mail() function in php.net, maybe you will find your answer there. Orio. Im creating an mmorpg and I need mappers for it. People with Experence with gaming. And I need developers to show there mapping skills so I need them to send me info on their skills woopsie... what i meant was: mail( "avatar.alex@yahoo.com", "Develop App - $name", "$message, $scriptingskills, $scripting, $mapping, $mappingskills", "From: $email" ); regards. nope didn't work I got this as an error Parse error: parse error, unexpected ';' in /home/www/killako.freehostia.com/sendmail.php on line 11 Quote Link to comment https://forums.phpfreaks.com/topic/64733-email-help/#findComment-322875 Share on other sites More sharing options...
avatar.alex Posted August 13, 2007 Author Share Posted August 13, 2007 is there a reason why it never sends emails to a yahoo.com email account Quote Link to comment https://forums.phpfreaks.com/topic/64733-email-help/#findComment-322883 Share on other sites More sharing options...
reages Posted August 13, 2007 Share Posted August 13, 2007 ...unexpected ';'... if the code you posted is what your actually using, then you must filter your user input. try first a crude test, and set every user input to pass a single character, ie a or 1 or something, except for the $name and $email. regards. Quote Link to comment https://forums.phpfreaks.com/topic/64733-email-help/#findComment-322948 Share on other sites More sharing options...
avatar.alex Posted August 15, 2007 Author Share Posted August 15, 2007 well it doesn't show up as any errors( it send me to the thank you page) but it won't send the email to my yahoo.com email my other feedback form did this also could I divide it up like this: <? $email = $_REQUEST['email'] ; $name = $_REQUEST['name'] ; $mappingskill = $_REQUEST['mappingskill'] ; $mapping = $_REQUEST['mapping'] ; $scripting = $_REQUEST['scripting'] ; $scriptingskill = $_REQUEST['scriptingskill'] ; $message = $_REQUEST['message'] ; mail( "adalbrecht67@aim.com", "Develop App - $name", "$message", "--------------", "$scriptingskill", "--------------", "$scripting", "--------------", "$mapping", "--------------", "$mappingskill"", "--------------", ""From: $email" ); header( "Location: /index.php?id=thankyou" ); ?> Quote Link to comment https://forums.phpfreaks.com/topic/64733-email-help/#findComment-324333 Share on other sites More sharing options...
rameshfaj Posted August 15, 2007 Share Posted August 15, 2007 If u want to have more parameters then make a function to do so or include the additional information in the header fields.The standard mail() function of the PHP cannot be overriden in that sense. Quote Link to comment https://forums.phpfreaks.com/topic/64733-email-help/#findComment-324419 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.