View Full Version : link display in php
02-16-2006, 04: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, 05:41 AM
Your code looks fine. Are you getting an error or what?
02-16-2006, 05:46 AM
Its not showing it as a link, its showing it as text
02-16-2006, 05: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, 05: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, 06: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, 06:07 AM
what would be the best way to do it automaticaly?
02-16-2006, 02: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, 02:58 PM
There is a basic example there for sending HTML email.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.