View Full Version : how do you do this?

08-29-2006, 07:53 PM
how do you get plain text from a mysql db an turn them into hyperlinks? here is the code i have so far

$query = "SELECT data,site FROM site where id=$id";
$result = MYSQL_QUERY($query);
$data = MYSQL_RESULT($result,0,"data");
print $data;
any help would be great :)

08-29-2006, 07:57 PM
you echo the html, and then the browser interprets it:

echo '<a href="'.$variable.'">Link Text</a>';

mysql plays no relevant part.

08-29-2006, 07:59 PM
ok thanks ill try your code

Lee Stevens
08-29-2006, 10:14 PM
But if you wanted to to do a random site link eveytime just use a DB to store it all then just select the description and link.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum