.i have the following code:
session_start();
$host = \'localhost\';
$user = \'root\';
$pw = \'\';
$db = \'pmdb\';
mysql_connect($host,$user,$pw);
mys
Try this :
here is code to get results :
$total = @mysql_num_rows(mysql_query("SELECT * FROM questions WHERE QuizID=1"));
$per_page = 5;
$page = $_GET['page'];
$query = "SELECT * FROM questions WHERE QuizID=1 , id >= (SELECT FLOOR( MAX(id) * RAND()) FROM `table` ) ORDER BY id LIMIT " . mysql_real_escape_string($per_page) ." OFFSET " . mysql_real_escape_string($page * $per_page) . "";
here is code to "next page" :
if($total >= ($page * $per_page))
{
echo 'Next Page';
}
maybe you have to change something in my code, because i haven't tried it to see if it works.