Immortal55 Posted April 9, 2006 Share Posted April 9, 2006 When I click the 'next' link nothing changes except the value of rowstart in the URL bar.What is wrong?:[code]if (!$rowstart) $rowstart = 0; $sql = mysql_query("SELECT * FROM user_art where user = '{$_REQUEST['user']}' and catagory = '{$_REQUEST['cid']}' order by id desc limit 15") or die(mysql_error()); $sql2 = mysql_query("SELECT * FROM user_art where user = '{$_REQUEST['user']}' and catagory = '{$_REQUEST['cid']}'") or die(mysql_error()); $numrows = mysql_num_rows($sql2); //the above line would get all your users, and order them by their Id's// the loop below would then make a link for every user while($row = mysql_fetch_array($sql)) { stripslashes($row); $id = $row['id']; if($HTTP_SESSION_VARS['valid_user'] == $_REQUEST['user']) { echo "<a href='picturefull.php?id=$id'>" . $row['title'] . "</a> - " . $row['description'] . " "; echo " - [<a href='updateart.php?id=$id'>edit</a>] [<a href='deleteart.php?id=$id'>delete</a>]<br><br>"; }else { echo "<a href='picturefull.php?id=$id'>" . $row['title'] . "</a> - " . $row['description'] . "<br>"; } } echo "<br><br>"; if ($rowstart != 0) { echo "<a href='$PHP_SELF?user=".$_REQUEST['user']."&cid=".$_REQUEST['cid']."&rowstart=".($rowstart - 15)."'>Last 15</a>"; } if (($rowstart + 15) < $numrows) { echo "<a href='$PHP_SELF?user=".$_REQUEST['user']."&cid=".$_REQUEST['cid']."&rowstart=".($rowstart + 15)."'>Next 15</a>"; }?>[/code] Quote Link to comment Share on other sites More sharing options...
Immortal55 Posted April 9, 2006 Author Share Posted April 9, 2006 if you need any more information, less code, or information on the code, let me know, I really need to figure this out! Quote Link to comment Share on other sites More sharing options...
Immortal55 Posted April 10, 2006 Author Share Posted April 10, 2006 anybody? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.