02-16-2006, 03:27 AM
Hi im making an email form in php,
I am having problems with adding a link to the $message can you see where im goin wrong.
$message = "A comment has been added to <a href='http://www.site.com/view.php?forum_id=$forum_id'>$forum_name</a>";
02-16-2006, 04:41 AM
Your code looks fine. Are you getting an error or what?
02-16-2006, 04:46 AM
Its not showing it as a link, its showing it as text
02-16-2006, 04:53 AM
I took your code and just made up some values for those variables and ran it on my server. Everything looked fine.
What values are you using for $forum_id and $forum_name?
02-16-2006, 04:55 AM
I think it must be somthing to do with it being a email, becuse i the emails are sent in text form, not html
02-16-2006, 05:03 AM
You can't have links in plain text email. You'll have to set it up as HTML email if you want the links to look ok and work as hyperlinks.
02-16-2006, 05:07 AM
what would be the best way to do it automaticaly?
02-16-2006, 01:19 PM
The easiest way to understand HTML email, in my opinion, is to find an HTML mail message in your InBox and view the message source to see how it's put together. For a detailed tutorial on how to setup an HTML email script, I'd recommend that you read the PHPMailer tutorial (http://www.phpfreaks.com/tutorials/130/0.php).
Hope this helps.
02-16-2006, 01:58 PM
There is a basic example there for sending HTML email.