Hi Naval,
Good Day.
I am using your form already for "Tell a Friend", however, when i tested &/or "submit" it, it doesn't show me the thank you message. I also try testing to input an error email address but it doest return me with my Error Link Messages. I followed exactly your procedure stated above however i am affraid i missed one. I already uploaded TAF in my control panel & edited some of the portion like names of link. Here's the TAF format i copied from my control panel:
<?php
# ----------------------------------------------------
# -----
# ----- This script was created by DB Technosystems.com
# -----
# -----
http://www.dbtechnosystems.com
# -----
# ----------------------------------------------------
// Receiving variables
@$Subject = addslashes($_POST['Subject']);
@$Mailbody = $_POST['Mailbody'];
@$Friendsemail = addslashes($_POST['Friendsemail']);
@$Youremail = addslashes($_POST['Youremail']);
@$Yourname = $_POST['Yourname'];
$Yourname = stripslashes($Yourname);
$$Friendname = stripslashes($Friendname);
$Mailbody = stripslashes($Mailbody);
// Validation
if (strlen($Friendsemail) == 0) {
header("Location: MailerError.html");
exit;
}
if (strlen($Youremail) == 0) {
header("Location: MailerError.html");
exit;
}
if (substr_count($Friendsname , '@') > 1) {
header("Location: SpammerError.html");
exit;
}
if (substr_count($Friendsname , 'www.') > 1) {
header("Location: SpammerError.html");
exit;
}
if (substr_count($Friendsname , 'http:') > 0) {
header("Location: SpammerError.html");
exit;
}
if (! ereg('[A-Za-z0-9_-]+\@[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', $Friendsemail))
{
header("Location: MailerError.html");
exit;
}
if (! ereg('[A-Za-z0-9_-]+\@[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+', $Youremail))
{
header("Location: MailerError.html");
exit;
}
if (substr_count($Friendsemail , '@') > 1) {
header("Location: MailerError.html");
exit;
}
if (substr_count($Friendsemail , 'www.') > 0) {
header("Location: SpammerError.html");
exit;
}
if (substr_count($Friendsemail , 'http:') > 0) {
header("Location: SpammerError.html");
exit;
}
if (substr_count($Youremail , '@') > 1) {
header("Location: MailerError.html");
exit;
}
if (substr_count($Youremail , 'www.') > 0) {
header("Location: SpammerError.html");
exit;
}
if (substr_count($Youremail , 'http:') > 0) {
header("Location: SpammerError.html");
exit;
}
if (substr_count($Subject , '@') > 0) {
header("Location: MailerError.html");
exit;
}
if (substr_count($Subject , 'http:') > 0) {
header("Location: MailerError.html");
exit;
}
if (substr_count($Subject , 'www') > 0) {
header("Location: MailerError.html");
exit;
}
if (substr_count($Mailbody , '@') > 0) {
header("Location: SpammerError.html");
exit;
}
if (substr_count($Mailbody , 'http:') > 1) {
header("Location: SpammerError.html");
exit;
}
if (substr_count($Mailbody , 'www.') > 1) {
header("Location: SpammerError.html");
exit;
}
//Sending Email to the Friend's email address
$header = "From: $Yourname < $Youremail >" . "\r\n";
$subject = $Subject;
$email_to = $Friendsemail;
$message = "Hi $Friendsname,\n"
. "$Mailbody\n"
. "\n"
. "Bye, \n"
. $Yourname;
*****($email_to, $subject ,$message ,$header ) ;
header("Location: Return.html");
?>
I am glad to receive feedback from you. Thanks & God Bless.
Best regards,
Dimz