Jump to content

making a url in a database a hyperlink


tmaunga

Recommended Posts

you also need to store the text you want displayed in the link,

then you simply just connect to your database and run this:

 

<?php

/*
CONNECT TO DATABASE!
*/
$query = mysql_query("SELECT * FROM table");
while($row = mysql_fetch_array($query)){
echo '<a href="'.$row['url'].'">'.$row['text'].'</a><br>'."\n";
}
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.