I already implemented this feature but why i've got this error on my page before it will show my homepage?
Thanks.
ERROR:
"; $status= "NOTOK";} if (strlen($y_name) <2 ) { // checking your name $msg .="Please enter your name
"; $status= "NOTOK";} if (!stristr($f_email,"@") OR !stristr($f_email,".")) { // checking friends email $msg .="Your Friends address is not correct
"; $status= "NOTOK";} if (strlen($f_name) <2 ) { // checking freinds name $msg .="Please enter your friend's name
"; $status= "NOTOK";} if (strlen($y_msg) <2 ) { // checking Message details $msg .="Please enter your message details
"; $status= "NOTOK";} if($status=="OK"){ // all validation passed /////////// Sending the message starts here ////////////// $ref=@$HTTP_REFERER; /////Message at the top of the page showing the url//// $header_message = "Peace $f_name \n Your friend $y_name has sent you the following message and requested you to visit the page at \n $ref \n"; /// Body message prepared with the message entered by the user //// $body_message =$header_message."\n".$y_msg."\n"; $body_message .="\n "; //// Mail posting part starts here ///////// $headers=""; //$headers = "Content-Type: text/html; charset=iso-8859-1\n".$headers; // Un comment the above line to send mail in html format $headers4=$y_email; // Change this to change from address $headers.="Reply-to: $headers4\n"; $headers .= "From: $headers4\n"; $headers .= "Errors-to: $headers4\n"; $subject="Request to visit URL"; mail($f_email,$subject,$body_message,$headers); ////// Mail posting ends here /////////// echo "
Thank You, Your message has been emailed to $f_name
"; echo "
You are being redirected back to the main page, if you are not diverted in 10 seconds please click here
Or Click the back button on your browser to return to the previous page
"; //////////// Sending the message ends here ///////////// }else{// display the error message echo "
$msg
"; } ?>