View Full Version : <a href> and echoing a website address

02-04-2007, 02:02 AM
Hi All...

I am trying to simplify a process but i think i may be overthinking it... Basically i have a form where a website address is entered in this format 'http://www.somesite.comSo in the database it is simply the url. When i echo that field I want to automatically add the <a href> tag to it so it is a live link... I tried this

<a href="<?php echo $row_rsDynamic['url']; ?>"><a/>

But no luck...

should i be looking at maybe the 'str_replace' function?

Thanks in advance....

02-04-2007, 02:15 AM
Figured it out....

<a href="<?php echo $row_rsDynamic['url']; ?>" target="_blank">
<?php echo $row_rsDynamic['name']; ?></a>

The URL field has the http://www.somesite.com address and then the name field is the display text....

02-04-2007, 08:40 AM
dont you just love it when the penny drops

02-05-2007, 02:45 PM
Yes... yes i do....