Jump to content

Help with php coding


dbe1800

Recommended Posts

Hello all,

i need help with my coding for my contact page...

 

im using flash and action script 3

 

the site is the5150crew.com - Contact Page

 

below i put my email.php code notice any errors?

 

when i test my file i get no errors but the email does not go thru...  :shrug::wtf:

 

 

<?php

 

$emailRecipient = "[email protected]";

$emailHeaders = "From: [email protected]\r\nContent-type: text/html\r\n";

$emailHeaders = "Reply-To: " .$_POST["userEmail"]. "\r\n";

$emailHeaders = "\r\n";

 

foreach ($_POST as $key => $value) {

$$key = stripslashes($value);

}

 

$emailBody = "<HTML>

<BODY>

<TABLE BORDER='1'>

<TR>

<TD align='left' width='780'>Email : ".$userEmail."</TD>

</TR>

<TR>

<TD align='left' width='780'>Name : ".$userName."</TD>

</TR>

<TR>

<TD align='left' width='780'>Message: <br><br>".$userMessage."</TD>

</TR>

</TABLE>

</BODY>

</HTML>";

 

if(mail($emailRecipient, "admin Form\n\n", $emailBody, $emailHeaders)){

echo "var1=success";

} else {

echo "var1=failure";

}

 

?>

 

Link to comment
https://forums.phpfreaks.com/topic/194026-help-with-php-coding/
Share on other sites

I don't see anything glaring at me, but mail can be difficult to troubleshoot because now it's not just your php code that can be a factor.  It's too much to give you a full flow chart, but here are some basic areas to troubleshoot:

 

First of all, put the php code on a page outside of the flash script.  Does it give you the success or failure message? (or none at all?)

 

Check the email server:  Does it show the incoming connectivity?  If not are php.ini mail settings configured properly?  Is the email server on the same LAN/VLAN segment as the php server and behind the same firewall?  Is your mail server configured to allow your php server to relay messages?

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.