PDA

View Full Version : PHP form mailer problems



slickeye
April 8th, 2004, 02:58 PM
i just added a mail for on my site, http://profile.slickeye.com. its still rough and not public yet but i cant get my mailer to work. heres my php

<?php

$sendTo = "mail@slickeye.com";
$subject = "Profile Email";

$headers = "From: " . $_POST["name"];
$headers .= "<" . $_POST["email"] .">\r\n";

$headers .= "Reply-To: " . $_POST["email"];

$message = $_POST["comments"];
$aim = $_POST["aim"];
$phone = $_POSR["phone"];


mail($sendTo, $subject, $comments, $headers);
?>

any help boys??

Jubba
April 8th, 2004, 03:54 PM
whats your flash code?

kill.robot.kill
April 8th, 2004, 03:59 PM
Ok, first fix $_POSR[phone] to $_POST....

next:
do you have the mail() function enabled on your server?
what happens if you upload this to your site, and you open the page?


<?php
mail("YOUR@EMAIL.HERE","test","Ok, it works");
?>



Lastly:
What happens if you do this?


<?php

$sendTo = "mail@slickeye.com";
$subject = "Profile Email";

$headers = "From: " . $_POST["name"];
$headers .= "<" . $_POST["email"] .">\r\n";

$headers .= "Reply-To: " . $_POST["email"];

$message = $_POST["comments"];
$aim = $_POST["aim"];
$phone = $_POST["phone"];

print $_POST["phone"];
print $_POST["aim"];
print $_POST["email"];
print $_POST["name"];

//mail($sendTo, $subject, $comments, $headers);
?>



give those a shot, and post back here if none of them work.

flaxcreatures
April 8th, 2004, 04:59 PM
don't worry you're not the only one with thos problems :p
I still had the problem this morning

slickeye
April 8th, 2004, 06:42 PM
kill.robot.kill
i tried both and i guess php does not work on my server. is that possible?? i am using a free host right now in transition from old host. could this be my problem????

skiistari
April 8th, 2004, 09:49 PM
Did you use the php-flash mailer tutorial on Kirupa? Because I did, and I'm still having problems with mine (http://naib.dnsalias.org:8000/~skiistari/ click on contact).

I think it might be a problem with the coding in the flash AS because I had several people look over my php and they all said it was fine, and yet I don't get my emails.
I think we need either a re-write of the tutorial, or some comprehensive problem-shooting.

UNFLUX
April 8th, 2004, 10:26 PM
kill.robot.kill
i tried both and i guess php does not work on my server. is that possible?? i am using a free host right now in transition from old host. could this be my problem????
well, this probably means that php is not enabled on the server. make a
page called test.php and put this on it and save to the server:

<? phpinfo() ?>
if php info shows up when you go to the page then it IS enabled, and he
needs to check it out. If nothing shows up except "<? phpinfo() ?>" then
you have no php capabilities.

Most free hosts don't allow php that I know of anyway.

slickeye
April 8th, 2004, 11:42 PM
yeah i figured it out this afternoon, its a win server with no php support. windows sucks. thought yall should know. im changing hosts as we speak.

flaxcreatures
April 9th, 2004, 03:59 AM
so bad luck today, at least you know what's goin on. Otherwise you could still be tryin for days