user2696320
user2696320

Reputation:

How to send a link in mail using PHP

I am trying to send a link in the mail using PHP but i am not able to format it properly :

$message=".<a href=."http://abc.com/viewprofile.php?userid=".$user_id.">"Click here to view user profile"</a>";

Upvotes: 0

Views: 252

Answers (1)

Ayush
Ayush

Reputation: 42440

Escape the quotes around href :

$message = "<a href=\"example.com\">Link</a>";

Upvotes: 1

Related Questions