errrm dude i tried and tried but cant do this could u add it to my code and post the whole thing on here please as i cannot figure it out and btw is there a specific code i need in the other page aswell ?
my code for listing & linking
<?php
require("C:\Program Files\Apache Group\Apache\htdocs\config.php");
$db = mysql_connect($db_host,$db_user,$db_pass);
mysql_select_db ($db_name) or die ("Cannot connect to database");
/* We have now connected, unless you got an error message */
/* Lets extract the data (news) from the database */
$query = "SELECT id, title, url, des, author, date FROM php_links ORDER BY id DESC";
$result = mysql_query($query);
/* Here we fetch the result as an array */
while($r=mysql_fetch_array($result))
{
/* This bit sets our data from each row as variables, to make it easier to display */
$id=$r["id"];
$title=$r["title"];
$url=$r["url"];
$des=$r["des"];
$author=$r["author"];
$date=$r["date"];
/* Now lets display the news */
echo "
Link: <a href=show.php?name=$title&id=$id>$title</A>
<br>
";
}
mysql_close($db);
?>
and here is my code for displaying everything on there....
<?php
require("C:\Program Files\Apache Group\Apache\htdocs\config.php");
$db = mysql_connect($db_host,$db_user,$db_pass);
mysql_select_db ($db_name) or die ("Cannot connect to database");
/* We have now connected, unless you got an error message */
/* Lets extract the data (news) from the database */
$query = "SELECT id, title, url, des, author, date FROM php_links ORDER BY id";
$result = mysql_query($query);
/* Here we fetch the result as an array */
while($r=mysql_fetch_array($result))
{
/* This bit sets our data from each row as variables, to make it easier to display */
$id=$r["id"];
$title=$r["title"];
$url=$r["url"];
$des=$r["des"];
$author=$r["author"];
$date=$r["date"];
/* Now lets display the news */
echo "
Link ID: $id<br>
Site: <a href='$url'>$title</a><br>
Description: $des<br>
Author: $author<br>
Date Added: $date<br><br><hr>
";
}
mysql_close($db);
?>
please help me asap thanks in advance
EDITED : sorry i forgot to add php tabs