http://www.w3bees.com/2013/09/jquery-in ... mysql.html
But in the PHP and HTML section, there is this:
Code: Select all
<?php
include('config.php');
$page = (int) (!isset($_GET['p'])) ? 1 : $_GET['p'];
# sql query
$sql = "SELECT * FROM actor_info ORDER BY id DESC";
# find out query stat point
$start = ($page * $limit) - $limit;
# query for page navigation
if( mysql_num_rows(mysql_query($sql)) > ($page * $limit) ){
$next = ++$page;
}
$query = mysql_query( $sql . " LIMIT {$start}, {$limit}");
if (mysql_num_rows($query) < 1) {
header('HTTP/1.0 404 Not Found');
echo 'Page not found!';
exit();
}
?>
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>jQuery Load While Scroll</title>
</head>
<body>
<div class="wrap">
<h1><a href="#">Data load while scroll</a></h1>
<!-- loop row data -->
<?php while ($row = mysql_fetch_array($query)): ?>
<div class="item" id="item-<?php echo $row['id']?>">
<h2>
<span class="num"><?php echo $row['id']?></span>
<span class="name"><?php echo $row['first_name'].' '.$row['last_name']?></span>
</h2>
<p><?php echo $row['film_info']?></p>
</div>
<?php endwhile?>
<!--page navigation-->
<?php if (isset($next)): ?>
<div class="nav">
<a href='index.php?p=<?php echo $next?>'>Next</a>
</div>
<?php endif?>
</div><!--.wrap-->
</body>
</html>Code: Select all
<a href='index.php?p=<?php echo $next?>'>Next</a>So how would I adjust this to work? AS at the moment, the animation is running at the bottom but nothing is adding to the screen. And yes, I do have the JS and CSS files referenced.