PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
form below piece of code i try to get the next page when 3 rows shown in table ,once user enter 4th row he will get page [1][2][3]
...and so on same liek this forum
so i jsut counted the rows from table t_emp where user
$Qpages=mysql_fetch_row(mysql_query("SELECT COUNT(*) FROM t_emp WHERE user = $session->sys_pk"));
$pages=ceil($Qpages[0]);
$offset=($HTTP_GET_VARS["page"]*3)-3;
$result = mysql_query(" SELECT
bah balh from
t_emp order by id DESC LIMIT $offset,3");
then here is some problem
<? for ($i=3; $i<=$pages; $i++) echo "<left><a href=test.phtml?page=$i> [$i] </a> ";?>
as now what happening once user submit the form it shows [1] [2] [3] and so on
if anybody figure it out be appreciated and anything not able to understand plz let me know
regards
this wont works sorry to say that and for not be clear from ym side
anyway
i want the rows from t_emp <to be shown three to a page? So if there were say 7 rows <then initially the user would see rows 1-3 on screen with <links to page 2 and 3, page 2 would show rows 4-6 and <page 3 would show row 7?
santa im back actually its my mistake actually i forget s in
$Qrec[0]; it should be $Qrecs[0]
it works fine but dont no how to get 1[2] in first page and second page must be [1]2
how to deal with this one