Tell A Friend Post, HTML isn't a URL

Hello. Another php question that I have deals with a “Tell A Friend” Link. I have the link working, the form working, and the email working. However, when an email is sent. The HTML link in the email isn’t a URL. I saw reference to using the $HTTP_REFERER but I kept getting errors. The code I have in now is below. In the email part, I have the website name typed in as a plain text. Is there a way using a command to make that link an active URL in email. Do I have to use the $ref=@$HTTP_REFERER

<? $status = "OK"; $msg=""; $y_name=$_POST['y_name']; $f_email=$_POST['f_email']; $f_name=$_POST['f_name']; $y_msg=$_POST['y_msg']; 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(stristr($y_msg,"http://") or stristr($y_msg,"https://") or stristr($y_msg,"<a href") or stristr($y_msg,"http://") or stristr($y_msg,"http://mysitegoeshere.com

n"; /// Body message prepared with the message entered by the user //// $body_message =$header_message."n".$y_msg."n"; $body_message .="n

Click on the link to visit Where Should I Go? A Guide to Northwestern Westchester County & Western Putnam County."; //// Mail posting part starts here ///////// $headers=""; $headers = "Content-Type: text/html; charset=iso-8859-1n".$headers; // Un comment the above line to send mail in html format $headers4="[email protected]"; // Change this to change from address $headers.="Reply-to: $headers4n"; $headers .= "From: $headers4n"; $headers .= "Errors-to: $headers4n"; $subject="$y_name wants you to look at this site"; mail($f_email,$subject,$body_message,$headers); ////// Mail posting ends here /////////// echo "Thank You. Your message was sent to $f_name."; //////////// Sending the message ends here ///////////// }else{// display the error message echo "$msg"; } ?>
Sponsor our Newsletter | Privacy Policy | Terms of Service