Jump to content

kniggles

New Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by kniggles

  1. Hello , I am stuck trying to get this code to work, every thing works well untill you try to go to the last record or a negtive - number in the records. ------------------------------------------------------- <?php include('conect.php'); $page = (isset($_GET['page'])) ? $_GET['page'] : 1; $startPoint = $page - 1; $data = "SELECT * FROM table1 ORDER BY id ASC LIMIT $startPoint,1"; $query = mysql_query($data); $data2 = mysql_fetch_array($query); $rowCount = 0; ?><HTML><HEAD><TITLE></TITLE><META content="text/html; charset=utf-8" http-equiv=Content-Type><META name=GENERATOR content="MSHTML 9.00.8112.16457"><STYLE type=text/css>BODY { FONT-FAMILY: verdana, arial, sans-serif }</STYLE></HEAD><BODY> <P></P> <P> <FORM method=post action=display4.php> <P></P> <P></P> Name: <INPUT value="<?php echo $data2[a]?>"> <INPUT value="<?php echo $data2[b]?>"> <INPUT value="<?php echo $data2[c]?>"><BR> Club: <BR> hobby: <P><INPUT style="Z-INDEX: 132; POSITION: absolute; TOP: 67px; LEFT: 151px" value="<?php echo $data2[id]?>"> <P><INPUT style="Z-INDEX: 132; POSITION: absolute; TOP: 66px; LEFT: 313px" value="<?php echo $data2[timenow]?>"> <P><BR> </P> <A href="display4.php?page=1">First</A> <A href="display4.php?page=<?php echo $page - 1?>">Prev</A> <A href="display4.php?page=<?php echo $page + 1?>">Next</A> <A href="display4.php?page=<??>hp echo $rowCount?;">Last</A> </FORM> <P></P></BODY></HTML> I am thinking its something to do with this line $data = "SELECT * FROM table1 ORDER BY id ASC LIMIT $startPoint,1"; any help please ? thanks.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.