I have the script which queries the database and then displays the results on the page. But I'm stuck on the linking part. The code I have so far is listed below.
<?php
//Beginning
require_once("config.php");
//Connects to database
$connect = mysql_connect("$database_host", "$database_username", "$database_password") or die(mysql_error());
mysql_select_db("$database_name") or die(mysql_error());
if (!$connect)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("$database_name", $connect);
$result = mysql_query("SELECT * FROM links");
while($row = mysql_fetch_array($result))
{
echo $row['link_name'];
echo "<br>";
echo "<br>";
echo $row['link_url'];
echo "<hr>";
echo "<br>";
}
mysql_close($connect);
//Ending
?>
Thanks for replying so fast dagon. & I Hope this helps!