Help me please...

Discussion in 'PHP' started by Superior, Mar 22, 2006.

  1. #1
    i have a script on www.sms2net.com
    all is fine i m facing just one problem that when i add more then 10 messages in any categary it creats a new page. and the page numbers show on the categary. but when i click on the page numbers it does not go to the 2nd 3rd pages. even on addressbar it shows that the link of 2nd or 3rd page.
    please check and guide me. i think it is not a big problem for any php coder. i shell be very thankfull to you.
    Thanks
    please check Miss you (English) categary and try to go 2nd or 3rd page. is it working???
     
    Superior, Mar 22, 2006 IP
  2. ing

    ing Well-Known Member

    Messages:
    500
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    195
    #2
    I get ...The page cannot be displayed
    Is the URL correct?
     
    ing, Mar 22, 2006 IP
  3. Superior

    Superior Well-Known Member

    Messages:
    488
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #3
    Superior, Mar 22, 2006 IP
  4. ing

    ing Well-Known Member

    Messages:
    500
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    195
    #4
    OK.. I still can't get it.
    Which script did u add?
     
    ing, Mar 22, 2006 IP
  5. Superior

    Superior Well-Known Member

    Messages:
    488
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #5
    No one can help me.???? :(
     
    Superior, Mar 24, 2006 IP
  6. vishwaa

    vishwaa Well-Known Member

    Messages:
    271
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    138
    #6
    imho there might be some error in your php script.

    the part where u retrieve the records from your database should like

    if(!is_numeric($_GET['pg'])) die("Invalid Request");
    $recsPerPage = 10;
    $offset = isset($_GET['pg']) ? intval( $_GET['pg'] ) * $recsPerPage : 0;
    .
    .
    .
    $query = "SELECT * FROM table_name WHERE cat=$id LIMIT $offset,$recsPerPage";
    .
    .
    .
    .


    please check your code.
     
    vishwaa, Mar 24, 2006 IP
  7. daboss

    daboss Guest

    Messages:
    2,249
    Likes Received:
    151
    Best Answers:
    0
    Trophy Points:
    0
    #7
    hmm... i went over to the site... can't see anything wrong. care to explain your problem a little more?
     
    daboss, Mar 24, 2006 IP
  8. Superior

    Superior Well-Known Member

    Messages:
    488
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #8
    I got the error but don't know how to fix it. Go to
    http://www.sms2net.com/category209.html and click page no. 2 the following page will open.
    http://www.sms2net.com/category209.html?pg=2&page=category&category_id=209
    and it will be same page no. 1 . but when i change the www.sms2net.com/category209.html? to http://www.sms2net.com/index.php?
    and the URL become:
    http://www.sms2net.com/index.php?pg=2&page=category&category_id=209
    this is actual page 2. and in the code it is

    I only want to show index.php in place of categoryname.html.
    how can i do it..
    the same script is running fine on
    www.aaarticles.com
     
    Superior, Mar 24, 2006 IP
  9. vishwaa

    vishwaa Well-Known Member

    Messages:
    271
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    138
    #9
    seems to be a mod rewrite problem.
     
    vishwaa, Mar 24, 2006 IP
  10. Superior

    Superior Well-Known Member

    Messages:
    488
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #10
    Can u correct it.???
     
    Superior, Mar 24, 2006 IP
  11. vishwaa

    vishwaa Well-Known Member

    Messages:
    271
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    138
    #11
    pm'd yahoo id.

    im not very familiar with mod rewite. anyway let us try
     
    vishwaa, Mar 24, 2006 IP
  12. Superior

    Superior Well-Known Member

    Messages:
    488
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #12
    Thanks mate.
    it is solved now.
    thank you very much for you guideness.
     
    Superior, Mar 24, 2006 IP