PHP pagination prolem -


I downloaded the pagination and used it in my website running in my local machine. After modifying and testing, I got a better result, but there was a problem that does not recognize the variable $ page, please see the following code:

  & lt ;? Php $ rpp = 3; // results $ per page = 4; $ Page = intval ($ _ GET ["page"]); If ($ page & lt; = 0) $ page = 1; $ Reload = $ _SERVER ['PHP_SELF']; $ Sql ​​= "SELECT * FROM" TABLE_IMAGE. "ORDER ID ASC"; $ Qry = mysql_query ($ sql, $ con); // Calculate the total number of proper listings: $ tcount = mysql_num_rows ($ qry); // count the number of pages: $ tpages = ($ tcount)? Limit ($ tcount / $ rpp): 1; // total page, final page number $ i = 1; $ Count = 0; $ J = ($ page-1) * $ rpp; While (($ result = mysql_fetch_array ($ qry)) & amp; amp; amp; (($ count & lt; $ rpp) & amp; ($ j & lt; $ tcount))) $ {id = $ result ['id ']; $ Img = $ result ['path']; $ Title = $ result ['title']; $ Detail = $ result ['expansion']; $ Priority = $ result ['priority']; $ Active = $ result ['active']; ? & Gt; & Lt; Div id = "block-image-slider" class = "& lt ;? php echo (($ i% 2 == 0?) 'Even:' weird ')? & Gt;" & Gt; & Lt; H2 & gt; & Lt ;? Php echo $ title? & Gt; & Lt; / H2 & gt; & Lt; Span class = "operation" & gt; [& Lt; A href = "? Action = edit & amp; section = slider & id = & lt;? Php echo $ id? & Gt;" & gt; One ???? Line Line Line Line Line Line Line & Lt; / A & gt; | & Lt; A href = "? Action = delete and section = slider and id = '& lt ;? php echo $ id? & Gt;" "& Gt; One ??????? ???? & lt; / a & gt; & lt; / span & gt; & lt; div class =" block-slider-image-body "& Gt; & lt; div class = "left">  
  • Which one? ???? ???? ???? ???? ???? ________
  • ??????? · A ???? §á á á ¶ ??? ??? ¸ ¸ & lt; span class = "space" & gt; & lt ;? php ek $ preference ? & Gt;
  • Li & gt ;? ???? How do you know ?????? ?????? ???? ???? ???? ???? ???? ?????????? S> echo ($ ($ Active == 1)? '' ???? ???? ???? ?? ????? ?????: '' ?????? ???? ?????? ???? ???? ???? ???? ???? Á ???? ') & lt; / span & gt;
  • li> Á ???? Á ???? Á ???? Á ???? Á ???? Do & lt ¢; Div class = "expansion" & gt; & Lt ;? Php echo $ detail? & Gt; & Lt; / Div & gt; & Lt; / Li & gt; & Lt; / Ul & gt; & Lt; / Div & gt; & Lt; Div class = "right" & gt; & Lt; Img src = "& lt ;? php echo '../../image/Slider/'.$img? & Gt;" Alt = "& lt ;? php echo $ title?" Width = "170" height = "100" /> & Lt; / Div & gt; & Lt; Div style = "clear: both;" & Gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt ;? Php mysql_data_seek ($ qry, $ j); $ I ++; $ J ++; $ Count ++; } // End of joining the loop ("..//paginate.php"); Resonance paget_three ($ reload, $ page, $ tapage, $ adjacent); ? & Gt;

    This is an error that occurred:

      Notice: Undefined index: In the page C: \ wamp \ www \ 1   

    I do not know how to modify more. Your URL would be appreciated for getting help? Page = 3 (where 3 will be the current page number). To correct this, you should change this line

      $ page = intval ($ _ GET ["page"]); From   

      $ page = (empty ($ _GET ["page"])? Intval ($ _GET ["page"]): 1);    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -