link stored in (MySQL) not displayed as a link but text.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tawfiq
Forum Newbie
Posts: 21
Joined: Sun Jan 27, 2008 12:19 pm

link stored in (MySQL) not displayed as a link but text.

Post by tawfiq »

I have this following lines of text in my database (as text type). I am not getting any success as to how to make the link display as an actual link. Why in my html page this link is being displayed as plain text? I have used php to generate that message when a user addes another user, store the message in the DB and when the added person checks their inbox it shows them the following message.

Code: Select all

 To confirm this friend request, follow the link below:  <a href = "http://localhost/nhsface/confirmFriends.php?confirmSli=9"> Link <a> 
In my source code it looks like this(which looks fine to me)

Code: Select all

 <tr>                    <td colspan="2"><textarea name="textfield2" cols="87" rows="10" class="whiteSquare" id="textfield2">To confirm this friend request, follow the link below:  <a href="http://localhost/nhsface/confirmFriends.php?confirmSli=9"> Link </a> </textarea></td></tr> 
if anybody is wondering what whiteSquare css class looks like

Code: Select all

  .whiteSquare{    border:1px solid #CCCCCC;    background-color:#FFFFFF;} 
Many Thanks for having a look at my code. Any help would be much appreciated.
tawfiq
Forum Newbie
Posts: 21
Joined: Sun Jan 27, 2008 12:19 pm

Re: link stored in (MySQL) not displayed as a link but text.

Post by tawfiq »

I found a workaround, I now how have an extra field in DB that holds just the url. I can display it as a link anywhere in the html page but not inside the <textarea> tag.

Any idea why?
Glycerine
Forum Commoner
Posts: 39
Joined: Wed May 07, 2008 2:11 pm

Re: link stored in (MySQL) not displayed as a link but text.

Post by Glycerine »

hmm... Does it need to be '/' slashed out?
Post Reply