...

View Full Version : mail error



somiadiscon
08-10-2007, 05:17 AM
hi all,
below send mail programe said line 3 error, could you pls find why is that and let me know pls
[line 3 mean $message ="Name:....... this line]
thanx

<?php
"----------------------------------------------------------------------"
$message="Name: ".$_POST['main_name']."\n". "Email: ".$_POST['email']. "\n"."Comments: ".$_POST['comme']."\n";
$headers="From: TOSOJK<tosojk@gmail.com>\r\n";
$date = date("l, F d, Y h : i", time());
$to="tosojk@gmail.com";
$subject="Comments from Visitor - Contact us";
mail($to, $subject, $message, $headers);
header("Location:confirmation.html");
?>

Rappa
08-10-2007, 05:36 AM
can we have the full code? and the whole error?

somiadiscon
08-10-2007, 06:04 AM
can we have the full code? and the whole error?

this is the full code my dear,

PappaJohn
08-10-2007, 06:39 AM
This line is not valid php, remove it.


"----------------------------------------------------------------------"

And, the error message should have given you more information. To help people help you, it's a good idea to post the whole text of the error message.


Also, your form does no error checking and is not secure.

somiadiscon
08-10-2007, 06:55 AM
This line is not valid php, remove it.


"----------------------------------------------------------------------"

And, the error message should have given you more information. To help people help you, it's a good idea to post the whole text of the error message.


Also, your form does no error checking and is not secure.


okey, i found another one good code but the thing is it say this mail has been send but i cant recieved from my gmail, could you pls tell me why is that

<?php
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$formcontent="VISITOR NAME: $name\n\nFEEDBACK: $message";
$recipient = "somiadiscon@gmail.com";
$subject = "Contact Form";
$mailheader = "From: $email\r\n";
$mailheader .= "Reply-To: $email\r\n";
$mailheader .= "MIME-Version: 1.0\r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Failure!");
echo "Thank You!";
?>

meth
08-10-2007, 07:12 AM
The first line of invalid code will throw a parse error for line 3 and if display_errors = 0, you'll see nothing but a blank page.

meth
08-10-2007, 07:16 AM
gmail, yahoo, hotmail and all the other free email providers - very unreliable. Test to a real email address first, not to a throw away mail address provider.

And every spambot in town is going to love your script.

somiadiscon
08-10-2007, 07:30 AM
gmail, yahoo, hotmail and all the other free email providers - very unreliable. Test to a real email address first, not to a throw away mail address provider.

And every spambot in town is going to love your script.

thanx for your opinion, here do u know any feedback programm will support to gmail



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum