tmaunga Posted December 13, 2007 Share Posted December 13, 2007 i have got url fields in my database eg www.sharp.com ,i wish to extract the field from the database and make it a hyperlink Quote Link to comment Share on other sites More sharing options...
Northern Flame Posted December 13, 2007 Share Posted December 13, 2007 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"; } ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.