THIS IS MY CODE SO FAR...ANY HELP PLEASE.....
<?php require_once('Connections/myConn.php'); ?>
<?php
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_rsQuestion = 1;
$pageNum_rsQuestion = 0;
if (isset($GET['pageNum_rsQuestion'])) {
$pageNum_rsQuestion = $GET['pageNum_rsQuestion'];
}
$startRow_rsQuestion = $pageNum_rsQuestion * $maxRows_rsQuestion;
mysql_select_db($database_myConn, $myConn);
$query_rsQuestion = "SELECT * FROM quest_tbl";
$query_limit_rsQuestion = sprintf("%s LIMIT %d, %d", $query_rsQuestion, $startRow_rsQuestion, $maxRows_rsQuestion);
$rsQuestion = mysql_query($query_limit_rsQuestion, $myConn) or die(mysql_error());
$row_rsQuestion = mysql_fetch_assoc($rsQuestion);
if (isset($GET['totalRows_rsQuestion'])) {
$totalRows_rsQuestion = $GET['totalRows_rsQuestion'];
} else {
$all_rsQuestion = mysql_query($query_rsQuestion);
$totalRows_rsQuestion = mysql_num_rows($all_rsQuestion);
}
$totalPages_rsQuestion = ceil($totalRows_rsQuestion/$maxRows_rsQuestion)-1;
$maxRows_rsQuestion = 1;
$pageNum_rsQuestion = 0;
if (isset($GET['pageNum_rsQuestion'])) {
$pageNum_rsQuestion = $GET['pageNum_rsQuestion'];
}
$startRow_rsQuestion = $pageNum_rsQuestion * $maxRows_rsQuestion;
//for ($i = 0; $i = 10; $i++) {
$queryString_rsQuestion = "";
if (!empty($SERVER['QUERY_STRING'])) {
$params = explode("&", $SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_rsQuestion") == false &&
stristr($param, "totalRows_rsQuestion") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_rsQuestion = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_rsQuestion = sprintf("&totalRows_rsQuestion=%d%s", $totalRows_rsQuestion, $queryString_rsQuestion);
//}
?>
<html>
<head>
<title>Oluseyi's Quiz Page</title>
<style type="text/css">
<!--
body {
background-image: url(images/bluewashqs.jpg);
}
-->
</style></head>
<body>
<form action="<?php printf("%s?pageNum_rsQuestion=%d%s", $currentPage, min($totalPages_rsQuestion, $pageNum_rsQuestion + 1), $queryString_rsQuestion); ?>" method="post" name="quesForm" id="quesForm">
<?php
do {
if ($pageNum_rsQuestion <= 10 ) {
?>
<table width="738" border="1" cellpadding="5" cellspacing="5" bgcolor="#996600">
<caption align ="left">
<strong> Question
</strong>
</caption>
<tr>
<th colspan="4" scope="col"><div align="left"><?php echo $row_rsQuestion['ques_id']; ?>: <?php echo $row_rsQuestion['questions']; ?></div></th>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
<tr>
<td>A
<input name="radiobutton" type="radio" value="radiobutton">
<?php echo $row_rsQuestion['possible1']; ?></td>
<td>B
<input name="radiobutton" type="radio" value="radiobutton">
<?php echo $row_rsQuestion['possible2']; ?></td>
<td>C
<input name="radiobutton" type="radio" value="radiobutton">
<?php echo $row_rsQuestion['possible3']; ?></td>
<td>D
<input name="radiobutton" type="radio" value="radiobutton">
<?php echo $row_rsQuestion['possible4']; ?></td>
</tr>
<tr>
<td colspan="4"><div align="center">
<input type="submit" name="Submit" value="Submit">
<a href="<?php printf("%s?pageNum_rsQuestion=%d%s", $currentPage, min($totalPages_rsQuestion, $pageNum_rsQuestion + 1), $queryString_rsQuestion); ?>"></a> </div></td>
</tr>
</table>
<?php } ?>
<?php } while ($row_rsQuestion = mysql_fetch_assoc($rsQuestion)) ?>
<p> </p>
<p> </p>
</form>
</body>
</html>
<?php
mysql_free_result($rsQuestion);
?>