The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Message variable not making it to email Reply To: Message variable not making it to email


Your PHP code didn’t show up. The forums here are not the best place to share bigger chunks of code; I would suggest using pastebin or making a gist on github, and then simply providing a link here.

-=-=-=-=-= Edit

There it is.

Have you tried var_dumping the $message variable to make sure it contains what you expect?

p.s. Your script is vulnerable to email header injection. You should validate the email address submitted by the user:

$email = filter_var( $_POST['email'],FILTER_VALIDATE_EMAIL );

Otherwise, a malicious user could include a whole list of headers and use your script as a spam server.