Results 1 to 7 of 7

Thread: confused....

  1. #1
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default confused....

    Ok I added a script to my site on the mainpage..
    it show the last 5 posted messages on my forum..
    but the thing is, it only works on the index page and won't show on anyother pages.. ill post code below..

    PHP Code:
    <?php 
    include "connect.php";


    $blog_postnumber 5;
    if(!isset(
    $_GET['page'])) {    $page 1;}else {    $page = (int)$_GET['page'];}$from = (($page $blog_postnumber) - $blog_postnumber);
    $getthreads="SELECT * from forum where parentid='0' order by lastrepliedto desc LIMIT $from$blog_postnumber";
    $getthreads2=mysql_query($getthreads) or die("Could not get threads");while($getthreads3=mysql_fetch_array($getthreads2)){  $getthreads3[title]=strip_tags($getthreads3[title]);    
    print 
    "<ul>
    <li><A href='forums/forums/message.php?id=
    $getthreads3[postid]'>$getthreads3[title]</a><BR></ul>";
    }

    ?>
    thats my code... and for an example..
    goto http://www.xudas.com
    and goto the about page or contact us page. it doesn't show up anything???

    PLZ HELP THNX!!!
    Hey new design new look, goto xudas for personal webdsign help.. (:

  2. #2
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Warning: Your title isn't describing your problem. Please read the new policy on thread titles.


    Because you have in the URL ?page=contact_us, so it'll try and convert "contact_us" into a number.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  3. #3
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    is there a way to fix this.. I neeeed help... that so wierd...

    if there is a way to fix it how would i go about doing this...

    plz... thanks
    Hey new design new look, goto xudas for personal webdsign help.. (:

  4. #4
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Change the URL structure of the page.

    And, SPELL dude.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  5. #5
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    is there a way to keep my url that way without changing anything but the coding.. or do i have to go back to seperate regular urls...

    sorry for my abbreviations lol.. I'll try not to do that..
    Hey new design new look, goto xudas for personal webdsign help.. (:

  6. #6
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    PHP Code:
    <?php 
    include "connect.php";


    $blog_postnumber 5;
    if(!isset(
    $_GET['p'])) {    $page 1;}else {    $page = (int)$_GET['p'];}$from = (($page $blog_postnumber) - $blog_postnumber);
    $getthreads="SELECT * from forum where parentid='0' order by lastrepliedto desc LIMIT $from$blog_postnumber";
    $getthreads2=mysql_query($getthreads) or die("Could not get threads");while($getthreads3=mysql_fetch_array($getthreads2)){  $getthreads3[title]=strip_tags($getthreads3[title]);    
    print 
    "<ul>
    <li><A href='forums/forums/message.php?id=
    $getthreads3[postid]'>$getthreads3[title]</a><BR></ul>";
    }

    ?>
    And get it in the form ?p=1, not ?page=1
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  7. #7
    Join Date
    Oct 2005
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thankyou so much.. it works now...
    Hey new design new look, goto xudas for personal webdsign help.. (:

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •