I know, I know, it's been asked a million times. I've searched this forum, many other forums, and google, but none of the articles I've read have quite helped me grasp paging with SQL output.
<!-- PHP Code -->
<?php
$username="bistro_templates";
$password="removed";
$database="templates";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
if (isset($_GET['id'])){
$query = "SELECT * FROM templates WHERE id ='" .$_GET['id']. "'";
$result = mysql_query($query) OR die('Error: ' . mysql_error());
} else {
echo "No Items Selected";
}
echo "<br><br>";
while($r=mysql_fetch_array($result)){
$preview = $r["preview"];
$name = $r["name"];
$code = $r["code"];
}
?>
I have the code being echoed into tables further down the page already designed with my CSS sheet. All of the paging tutorials just keep failing no matter what I try and it's killing my nerdy head!
The way the site consists, I have roughly 5 tables, each connect to a administrator backend my writers and staff have access to, and now we need to page out the files to separate our data.
I appreciate any help and explanation of how this works...I am trying now to have to redesign my tables as it's 100s of pages. The variables are echoed throughout those pages, but if I have to, I will do it. Thanks Guys!