GeekPolice
Would you like to react to this message? Create an account in a few clicks or log in to continue.

GeekPoliceLog in

 


descriptionsending email Emptysending email

more_horiz
Hi,

I have a form which, when filled out correctly, will send the user an email containing his/her username/password.
Now, I've already uploaded the php files to my host. but then when i tested it. it didn't sent me email (i used my own email for testing)

what should i do?

Code:


$to      = $_POST[email];
$subject = ' Account Information';
$message = 'trial message';
mail($to, $subject, $message);


that's the php code in mail. php
my form is in create.php

so from create.php, you click submit there, then it will go to mail.php

thank you.

descriptionsending email EmptyRe: sending email

more_horiz
Assuming you're using the mail() function correctly, the only errors I see are missing apostrophes in the $to variable:

Code:

$to      = $_POST['email'];
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum