Hi, ive got a small bit of code which simply outputs something from a database
all i need is for someone to show me how to incorporate next/previous links in it
ive had a look at a few tutorials on this, but cant get it to fit in with my code
does anyone think they could help?
here is the code as it stands now:
<?
//connect to mysql
//change user and password to your mySQL name and password
mysql_connect("localhost","user","pass");
//select which database you want to edit
mysql_select_db("debbie_news");
//select the table
$result = mysql_query("select * from products order by id desc");
//grab all the content
while($r=mysql_fetch_array($result))
{
//the format is $variable = $r["nameofmysqlcolumn"];
//modify these to match your mysql table columns
$title=$r["title"];
$description=$r["description"];
$img=$r["img"];
$price=$r["price"];
$available=$r["available"];
$type=$r["type"];
$id=$r["id"];
//display the row
echo "
<table width='100%' border='0' cellpadding='0' cellspacing='0' bgcolor='EDEEFC' style='border: 1px solid #ffffff;'>
<tr>
<td>
<tr>
<td><b>$type $title</b></td><td></td>
</tr>
<tr>
<td><A href='$img' border='0' target='_blank'><img src='$img' border='1' width='160' height='180' ></a></td><td valign='top'>$description <br>
<br>
$price , Available: $available</td>
</tr>
<tr>
<td> </td><td></td>
</tr>
</td>
</tr>
</table>
<br>
";
}
?>
Help on this would be greatly appreciated, its all i need to finish up a part of a site,
thanks, Paul.