0

Hi frnds...

I m inserting some text(link+) into db table like :


Our PHP forum is the place for Q&A-style discussions related to this popular development language. LAMP programmers...

http://www.xxxxxxxx.com/gallery/gallery.php?gid=295&gcat=Heroines&gname=Bhumika%20Chawla's%20Hot%20....

Our PHP forum is the place for Q&A-style discussions related to this popular development language. LAMP programmers

When i am fecthing into user page it displays as normal text...
i need to change this as URLlink.,...plz tell me how can i do this....is there any php funtion to change this as url...

Thanks in advance...
hey, just check this great metatrader

4
Contributors
6
Replies
7
Views
8 Years
Discussion Span
Last Post by diafol
0

Hi frnds...

I m inserting some text(link+) into db table like :


Our PHP forum is the place for Q&A-style discussions related to this popular development language. LAMP programmers...

http://www.xxxxxxxx.com/gallery/gallery.php?gid=295&gcat=Heroines&gname=Bhumika%20Chawla's%20Hot%20....

Our PHP forum is the place for Q&A-style discussions related to this popular development language. LAMP programmers

When i am fecthing into user page it displays as normal text...
i need to change this as URLlink.,...plz tell me how can i do this....is there any php funtion to change this as url...

Thanks in advance...
hey, just check this great metatrader

You May Use <a href> for Converting it to URL Link.
Use this tag: <a href='".$row['F_Name']."' title="Your Title Here">Your Fetching Link</a> The above convert your normal text into link.

Edited by hemgoyal_1990: n/a

0

You May Use <a href> for Converting it to URL Link.
Use this tag: <a href='".$row['F_Name']."' title="Your Title Here">Your Fetching Link</a> The above convert your normal text into link.

Hi hemgoyal..

$row...contains both text and url...not only url...that is my problem...how can i divide this url from text..

0

Well if for example say $row['F_Name']="http://example.com/gallery/gallery.php" then you would use the following:

echo '<a href="'.$row['F_Name'].'?variable='.$variable.'&id=2'.'">Link title</a>

Then in that page you linked to place the following code

echo $_GET['variable'];
echo '<br>';
echo $_GET['id'];
0

OK if I get you right, the db field contains description or title text and the url itself. You need to search for the start of the url and then the end of the url to extract the info. Although I hate it with a vengeance, I'd use regex to determine the url.

See http://www.regexguru.com/2008/11/detecting-urls-in-a-block-of-text/
for some info.

If, on the other hand. you want to display the whole text but you're seeing the url tags instead of a clickable link, it may be that you've encoded the input to the db with htmlentities() and not reversed the function on output.

0

@hemgoyal_1990 - let the guy respond first. Sheesh! Are you desperate for some merit points or what?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.