hyperlinks in a database

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
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

hyperlinks in a database

Post by malcolmboston »

Code: Select all

print "cant find anything on this subject";
hiya guys was just wondering how it is possible to make a links appear (properly in a page when extracting from MySQL

i have an idea for my site special members area, where they have the ability to 'add the favourite sites' so they just click a link and its there, was not sure if you could just put the HTML code in MySQL and it would work that way or creating 2 seperate columns and kind of merging them together

im sure this is done often

Any Help?
User avatar
Saethyr
Forum Contributor
Posts: 182
Joined: Thu Sep 25, 2003 9:21 am
Location: Wichita, Kansas USA
Contact:

Post by Saethyr »

I do a database pull then do something along the lines of...

Code: Select all

<?php
$foo = $row["linkname"];

echo "<a href="$foo">$foo</a>";
?>

Seems to work pretty well for what I have needed so far, but then again I don't care about things like speed... ;)


Saethyr
Post Reply