next page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    next page

    i have created my own script gb but theres a problem in sending to next page
    wot i mean is if i click nextpage, it dont sends to 2nd page so it returns to the first page
    Code:
    <?php
    
    header("Content-type: text/vnd.wap.wml");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    
    echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
    ?>
    <wml>
    <?php
    
    $nick = $_GET["nick"];
    $device = $_GET["device"];
    $msg = $_GET["msg"];
    $email = $_GET["email"];
    include("core.php");
    include("config.php");
    
    echo "<card id=\"irc\" title=\"$stitle\">";
    echo "<p align=\"center\">";
    echo "<img src=\"gb.gif\" alt=\"\"/><br/>";
    
    echo "<b>Please Report all Errors here!</b>";
    echo "<br/>";
    echo "</p>";
    echo "<p>";
    echo "<small>";
    echo "<a href=\"write.php\">[Write Text]</a><br/>";
    echo "---<br/>";
    
    
    
    
    
     if($page=="" || $page<=0)$page=1;
        $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM keanpogi"));
    
        $num_items = $noi[0]; //changable
        $items_per_page= 10;
        $num_pages = ceil($num_items/$items_per_page);
        if(($page>$num_pages)&&$page!=1)$page= $num_pages;
        $limit_start = ($page-1)*$items_per_page;
    
    
            $sql = "SELECT id, nick, msg, email, device FROM keanpogi ORDER BY id DESC LIMIT $limit_start, $items_per_page";
        $cou = $limit_start;
    	$items = mysql_query($sql);
        if(mysql_num_rows($items)>0)
        {
        while ($item = mysql_fetch_array($items))
        {
        $cou++;
      /// echo "$cou.";
    
    
    
    
    
    $msg2 = parsepm($msg);
    
    
    echo "Nick: ".htmlspecialchars($item[1])."
    <br/>"; 
    echo "Email: ".htmlspecialchars($item[3])."
    <br/>";
    echo "Device: ".htmlspecialchars($item[4])."
    <br/>";
    echo "Message: ".htmlspecialchars($item[2])."
    <br/>";
    
    echo "<img src=\"line.gif\" alt=\"*\"/><br/>";
    
    
    
    }
    
    
    
    
    if($page>1)
        {
          $ppage = $page-1;
          echo "<a href=\"index.php?action=results&amp;page=$ppage\">«Prev</a> ";
        }
        if($page<$num_pages)
        {
          $npage = $page+1;
          echo "<a href=\"index.php?action=results&amp;page=$npage\">Next»</a>";
        }
        echo "<br/>Page $page|$num_pages<br/>";
        
    }
    echo "</small>";
    echo "</p>";
    echo "<p align=\"center\">";
    echo "<small>";
    echo "Powered by: <a href=\"index.php\">VaMpirEfreakz</a><br/>";
    
    
    
    echo "</small>";
    
    
    
    echo "</p>";
    echo "</card>";
    
    
    
    ?>
    </wml>


    how can i fixed it?LOL
    Last edited by wapmetal; 21.11.09, 05:14.
    com site: http://vampist.net
    download site: http://wapdloads.net
    fb: http://www.facebook.com/pmplx

    #2
    thers something wrong in this code i think

    Code:
     if($page=="" || $page<=0)$page=1;
        $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM keanpogi"));
    
        $num_items = $noi[0]; //changable
        $items_per_page= 10;
        $num_pages = ceil($num_items/$items_per_page);
        if(($page>$num_pages)&&$page!=1)$page= $num_pages;
        $limit_start = ($page-1)*$items_per_page;
    
    
            $sql = "SELECT id, nick, msg, email, device FROM keanpogi ORDER BY id DESC LIMIT $limit_start, $items_per_page";
        $cou = $limit_start;


    and when i change $page=1 to $page=2

    now it shows 2nd page

    Code:
     if($page=="" || $page<=0)$page=[b]2[/b];
        $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM keanpogi"));
    
        $num_items = $noi[0]; //changable
        $items_per_page= 10;
        $num_pages = ceil($num_items/$items_per_page);
        if(($page>$num_pages)&&$page!=1)$page= $num_pages;
        $limit_start = ($page-1)*$items_per_page;
    
    
            $sql = "SELECT id, nick, msg, email, device FROM keanpogi ORDER BY id DESC LIMIT $limit_start, $items_per_page";
        $cou = $limit_start;
    Last edited by wapmetal; 21.11.09, 05:14.
    com site: http://vampist.net
    download site: http://wapdloads.net
    fb: http://www.facebook.com/pmplx

    Comment


      #3
      Code:
      <?php
      
      header("Content-type: text/vnd.wap.wml");
      header("Cache-Control: no-store, no-cache, must-revalidate");
      
      echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"". " \"http://www.wapforum.org/DTD/wml_1.1.xml\">";
      ?>
      <wml>
      <?php
      
      $nick = $_GET["nick"];
      $device = $_GET["device"];
      $msg = $_GET["msg"];
      $email = $_GET["email"];
      $page = $_GET["page"];
      include("core.php");
      include("config.php");
      
      echo "<card id=\"irc\" title=\"$stitle\">";
      echo "<p align=\"center\">";
      echo "<img src=\"gb.gif\" alt=\"\"/><br/>";
      
      echo "<b>Please Report all Errors here!</b>";
      echo "<br/>";
      echo "</p>";
      echo "<p>";
      echo "<small>";
      echo "<a href=\"write.php\">[Write Text]</a><br/>";
      echo "---<br/>";
      
      
      
      
      
       if($page=="" || $page<=0)$page=1;
          $noi = mysql_fetch_array(mysql_query("SELECT COUNT(*) FROM keanpgi"));
      
          $num_items = $noi[0]; //changable
          $items_per_page= 10;
          $num_pages = ceil($num_items/$items_per_page);
          if(($page>$num_pages)&&$page!=1)$page= $num_pages;
          $limit_start = ($page-1)*$items_per_page;
      
      
              $sql = "SELECT id, nick, msg, email, device FROM astig ORDER BY id DESC LIMIT $limit_start, $items_per_page";
          $cou = $limit_start;
      	$items = mysql_query($sql);
          if(mysql_num_rows($items)>0)
          {
          while ($item = mysql_fetch_array($items))
          {
          $cou++;
        /// echo "$cou.";
      
      
      
      
      
      $msg2 = parsepm($msg);
      
      
      echo "Nick: ".htmlspecialchars($item[1])."
      <br/>"; 
      echo "Email: ".htmlspecialchars($item[3])."
      <br/>";
      echo "Device: ".htmlspecialchars($item[4])."
      <br/>";
      echo "Message: ".htmlspecialchars($item[2])."
      <br/>";
      
      echo "<img src=\"line.gif\" alt=\"*\"/><br/>";
      
      
      
      }
      
      
      
      
      if($page>1)
          {
            $ppage = $page-1;
            echo "<a href=\"index.php?action=results&amp;page=$ppage\">«Prev</a> ";
          }
          if($page<$num_pages)
          {
            $npage = $page+1;
            echo "<a href=\"index.php?action=results&amp;page=$npage\">Next»</a>";
          }
          echo "<br/>Page $page|$num_pages<br/>";
          
      }
      echo "</small>";
      echo "</p>";
      echo "<p align=\"center\">";
      echo "<small>";
      echo "Powered by: <a href=\"index.php\">VaMpirEfreakz</a><br/>";
      
      
      
      echo "</small>";
      
      
      
      echo "</p>";
      echo "</card>";
      
      
      
      ?>
      </wml>
      Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
      Visit: WapMasterz Coming Back Soon!
      _______
      SCRIPTS FOR SALE BY SUBZERO
      Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
      FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
      _______
      Info & Tips
      php.net
      w3schools.com

      Comment


        #4
        yeah thanks it works tnx subzero!
        so i only forgot this! ****

        $page = $_GET["page"];
        com site: http://vampist.net
        download site: http://wapdloads.net
        fb: http://www.facebook.com/pmplx

        Comment


          #5
          lol yeah its does look like it lol
          Visit: Chat4u.mobi - The New Lay Of being a site of your dreams!
          Visit: WapMasterz Coming Back Soon!
          _______
          SCRIPTS FOR SALE BY SUBZERO
          Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders.
          FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others...
          _______
          Info & Tips
          php.net
          w3schools.com

          Comment


            #6
            Originally posted by wapmetal View Post
            yeah thanks it works tnx subzero!
            so i only forgot this! ****

            $page = $_GET["page"];

            maybe u should protect your varibales request like this

            $page = mysql_real_escape_string( $_GET["page"] );
            Want something coded email me at sales@webnwaphost.com for a prices.




            Comment

            Working...
            X