Checkbox error in inbox

Started on the old forum in April 2012 · view the original in the archive · old links redirect here

11 replies · 793 views · started 14 years ago · 3 min read

5 participants
ACIDCORE Junior · 30 posts #1

every time i try to check and delete a msg it always shows 0 msg successfully deleted. i dont know where is my error here. here is my code:

echo "<head>";
  echo "<title>My Messages</title>";
  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$test[0]\"/>";
  echo "</head>";
 echo "<meta http-equiv=\"refresh\" content=\"20; URL= inbox.php?do=$do&rid=$rid\"/>";
  addonline(getuid_sid($sid),"User Inbox","");
    echo "<div align=\"center\"><div class=\"top\">Messages</div>";
    echo getshoutbox($sid);
    $res = "";
  
    if($_POST["submit"])
    {
    
    $count = 0;
    
    foreach($_POST["check"] as $value)
     {
     $pmid = $value;
     
     $pminfo = mysql_fetch_array(mysql_query("SELECT text, byuid, touid, reported FROM test_private WHERE id='".$pmid."'"));
     if ($uid==$pminfo[2])
      {
      if($pminfo[3]!=1)
       {
       $yes = mysql_query("DELETE FROM test_private WHERE id='".$pmid."'");
       if($yes)
        {
       $count++; 
        }
       }
      }     
     }
     $res = "<b>$count Messages Successfully Deleted!</b><br>";   
    }
    echo "<form action=\"inbox.php\" method=\"get\">";
    echo "View: <select name=\"view\">";
  echo "<option value=\"all\">All</option>";
  echo "<option value=\"snt\">Sent</option>";
  echo "<option value=\"str\">Starred</option>";
  echo "<option value=\"urd\">Unread</option>";
  echo "</select>";
echo "<input type=\"hidden\" name=\"do\" value=\"$do\"/>";
//echo "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
echo "<input type=\"submit\" value=\"Go\"/>";
echo "</form><br/>";

    echo "</div>";
    $view = safe(cleanInput($_GET["view"]));
    //////ALL LISTS SCRIPT <<
    if($view=="")$view="all";
    if($page=="" || $page<=0)$page=1;
    $myid = getuid_sid($sid);
    $doit=false;
    $num_items = getpmcount($myid,$view); //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if($page>$num_pages)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;
    if($num_items>0)
    {
      if($doit)
      {
        $exp = "&rwho=$myid";
      }else
      {
        $exp = "";
      }
    //changable sql
    if($view=="all")
  {
    $sql = "SELECT
            a.name, b.id, b.byuid, b.unread, b.starred FROM test_users a
            INNER JOIN test_private b ON a.id = b.byuid
            WHERE b.touid='".$myid."' AND b.folderid='0'
            ORDER BY b.timesent DESC
            LIMIT $limit_start, $items_per_page
    ";
  }
   else if($view=="fldr"){
    $sql = "SELECT
            a.name, b.id, b.byuid, b.unread, b.starred FROM test_users a
            INNER JOIN private_folders b ON a.id = b.byuid
            WHERE b.touid='".$myid."' b.folderid='".$folderid."' AND b.starred = '1'
            ORDER BY b.timesent DESC
            LIMIT $limit_start, $items_per_page
    ";

  }else if($view=="snt")
  {
    $sql = "SELECT
            a.name, b.id, b.touid, b.unread, b.starred FROM test_users a
            INNER JOIN test_private b ON a.id = b.touid
            WHERE b.byuid='".$myid."'
            ORDER BY b.timesent DESC
            LIMIT $limit_start, $items_per_page
    ";
  }else if($view=="str")
  {
    $sql = "SELECT
            a.name, b.id, b.byuid, b.unread, b.starred FROM test_users a
            INNER JOIN test_private b ON a.id = b.byuid
            WHERE b.touid='".$myid."' AND b.starred='1'
            ORDER BY b.timesent DESC
            LIMIT $limit_start, $items_per_page
    ";
  }else if($view=="urd")
  {
    $sql = "SELECT
            a.name, b.id, b.byuid, b.unread, b.starred FROM test_users a
            INNER JOIN test_private b ON a.id = b.byuid
            WHERE b.touid='".$myid."' AND b.unread='1'
            ORDER BY b.timesent DESC
            LIMIT $limit_start, $items_per_page
    ";
  }
    
    echo "<div class=\"nav\">Inbox</div><hr/><div align=\"left\">";
    echo $res;
    $items = mysql_query($sql);
    echo mysql_error();
    echo '<form action="inbox.php?do=main" method="post">';
    while ($item = mysql_fetch_array($items))
    {
      if($item[3]=="1")
      {
        $iml = "<small>[_]</small>";
      }else{
        if($item[4]=="1")
        {
            $iml = "<small>[str]</small>";
        }else{

        $iml = "<small>[x]</small>";
        }
      }
      
      $lnk = "<a href=\"pm-$item[1].php\">$iml$item[0]</a>";
      
      $pmtext = mysql_fetch_array(mysql_query("SELECT text FROM test_private WHERE id='".$item[1]."'"));
      $mprev = (htmlspecialchars(strlen($pmtext[0])<20?$pmtext[0]:substr($pmtext[0], 0, 15)));
      //$mtext = parsepm($mprev, $sid);
      echo '<input type="checkbox" name="check[]" value="'.$item[1].'"/>';
      echo "$lnk: $mprev..";
      echo "<br/>";
    }
    echo '<br><input type="submit" name="submit" value="delete"/>';
    echo '</form>';
    echo "</div>";
    echo "<div align=\"center\">";
    
      $npage = $page+1;
      echo "<hr/><a href=\"inbox.php?do=sendto\">Send Message</a><br/>";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"inbox.php?do=main&page=$ppage&view=$view$exp\">«Prev</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"inbox.php?do=main&page=$npage&view=$view$exp\">Next»</a>";
    }
    echo "<br/>$page of $num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "<form action=\"inbox.php\" method=\"get\">";
      $rets .= "Go To Page: <input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>";
$rets .= "<input type=\"submit\" value=\"Go\"/>";
        $rets .= "<input type=\"hidden\" name=\"do\" value=\"$do\"/>";
        //$rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
         
        $rets .= "<input type=\"hidden\" name=\"view\" value=\"$view\"/>";
$rets .= "</form>";
        echo $rets;

      echo "<br/>";
    }

echo "<form action=\"inbxproc.php?do=proall\" method=\"post\">";
      echo "Delete: <select name=\"pmact\">";
  echo "<option value=\"red\">Read</option>";
  echo "<option value=\"unrd\">Unread</option>";
  echo "<option value=\"ust\">Unstarred</option>";
  echo "<option value=\"all\">All Msg</option>";
  echo "</select>";
echo "<input type=\"submit\" value=\"Go\"/>";
echo "</form></div>";
echo "<div align=\"center\"><a href=\"inbox.php?do=crfolder\">Create New Folder</a><br/>";
	 echo "<a href=\"inbox.php?do=myfolder\">My Folders</a><br/>";

    }else{
      echo "<div align=\"center\">";
      echo "You Have No Private Messages<br/><a href=\"inbox.php?do=sendto\">Send Message</a><br/>";
      echo "<div align=\"center\"><a href=\"inbox.php?do=crfolder\">Create New Folder</a><br/>";
      echo "<a href=\"inbox.php?do=myfolder\">My Folders</a><br/>";
      echo "</div>";
    }
  ////// UNTILL HERE >>

    
    
  echo "<div align=\"center\">";

$plc = mysql_fetch_array(mysql_query("SELECT saan FROM test_users WHERE id='".$uid."'"));
echo "<br/><a href=\"$plc[0]\">Exit Inbox</a> ";
  echo "<a href=\"index.php?do=forums\">Forums</a> <a href=\"index.php?do=chat\">Chatrooms</a> <a href=\"main.php\">";
echo "Home</a><hr/><div class=\"footer\">$mysite</div>";
  echo "<br/>Script Timer ";
$load = microtime();
print (number_format($load,2));
echo " sec";

 echo "</div>";
  echo "</body>";
  }
something else Fellow · 2,296 posts #2

use [ php ] [ /php ] tags or [ code ] [ /code ] tags

$check = $_POST["check"];
foreach($check as $value)
ACIDCORE Junior · 30 posts #3

is it n0t d same with d one i did?d only difference iv n0ticed is d variable u put?tnx anyway

something else Fellow · 2,296 posts #6

try:

echo "<input type=\"submit\" name=\"submit\" value=\"Go\"/>";
//random text here to get rid of opera bug :/
ACIDCORE Junior · 30 posts #7

im still getting the same erro.any other idea mate?it would be a nice share if u do so.tnx

phzone Junior · 18 posts #8

delete $_Post trim($_Post) from core.php and those foreach ($_Post) in core.php and iconect.php this code will work..

Loony Senior · 258 posts #9

lol

its because u set the $count variable to 0 then when u call it your getting the 0 that u set

<?
echo "<head>"; 
  echo "<title>My Messages</title>"; 
  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$test[0]\"/>"; 
  echo "</head>"; 
 echo "<meta http-equiv=\"refresh\" content=\"20; URL= inbox.php?do=$do&rid=$rid\"/>"; 
  addonline(getuid_sid($sid),"User Inbox",""); 
    echo "<div align=\"center\"><div class=\"top\">Messages</div>"; 
    echo getshoutbox($sid); 
    $res = ""; 
   
    if($_POST["submit"]) 
    { 
     
   $count = 0; //<-------------------------------------------------------------------------------------------------------------problem is here
     
    foreach($_POST["check"] as $value) 
     { 
     $pmid = $value; 
      
     $pminfo = mysql_fetch_array(mysql_query("SELECT text, byuid, touid, reported FROM test_private WHERE id='".$pmid."'")); 
     if ($uid==$pminfo[2]) 
      { 
      if($pminfo[3]!=1) 
       { 
       $yes = mysql_query("DELETE FROM test_private WHERE id='".$pmid."'"); 
       if($yes) 
        { 
       $count++;  
        } 
       } 
      }      
     } 
     $res = "<b>$count Messages Successfully Deleted!</b><br>";    
    } 
    echo "<form action=\"inbox.php\" method=\"get\">"; 
    echo "View: <select name=\"view\">"; 
  echo "<option value=\"all\">All</option>"; 
  echo "<option value=\"snt\">Sent</option>"; 
  echo "<option value=\"str\">Starred</option>"; 
  echo "<option value=\"urd\">Unread</option>"; 
  echo "</select>"; 
echo "<input type=\"hidden\" name=\"do\" value=\"$do\"/>"; 
//echo "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>"; 
echo "<input type=\"submit\" value=\"Go\"/>"; 
echo "</form><br/>"; 

    echo "</div>"; 
    $view = safe(cleanInput($_GET["view"])); 
    //////ALL LISTS SCRIPT << 
    if($view=="")$view="all"; 
    if($page=="" || $page<=0)$page=1; 
    $myid = getuid_sid($sid); 
    $doit=false; 
    $num_items = getpmcount($myid,$view); //changable 
    $items_per_page= 10; 
    $num_pages = ceil($num_items/$items_per_page); 
    if($page>$num_pages)$page= $num_pages; 
    $limit_start = ($page-1)*$items_per_page; 
    if($num_items>0) 
    { 
      if($doit) 
      { 
        $exp = "&rwho=$myid"; 
      }else 
      { 
        $exp = ""; 
      } 
    //changable sql 
    if($view=="all") 
  { 
    $sql = "SELECT 
            a.name, b.id, b.byuid, b.unread, b.starred FROM test_users a 
            INNER JOIN test_private b ON a.id = b.byuid 
            WHERE b.touid='".$myid."' AND b.folderid='0' 
            ORDER BY b.timesent DESC 
            LIMIT $limit_start, $items_per_page 
    "; 
  } 
   else if($view=="fldr"){ 
    $sql = "SELECT 
            a.name, b.id, b.byuid, b.unread, b.starred FROM test_users a 
            INNER JOIN private_folders b ON a.id = b.byuid 
            WHERE b.touid='".$myid."' b.folderid='".$folderid."' AND b.starred = '1' 
            ORDER BY b.timesent DESC 
            LIMIT $limit_start, $items_per_page 
    "; 

  }else if($view=="snt") 
  { 
    $sql = "SELECT 
            a.name, b.id, b.touid, b.unread, b.starred FROM test_users a 
            INNER JOIN test_private b ON a.id = b.touid 
            WHERE b.byuid='".$myid."' 
            ORDER BY b.timesent DESC 
            LIMIT $limit_start, $items_per_page 
    "; 
  }else if($view=="str") 
  { 
    $sql = "SELECT 
            a.name, b.id, b.byuid, b.unread, b.starred FROM test_users a 
            INNER JOIN test_private b ON a.id = b.byuid 
            WHERE b.touid='".$myid."' AND b.starred='1' 
            ORDER BY b.timesent DESC 
            LIMIT $limit_start, $items_per_page 
    "; 
  }else if($view=="urd") 
  { 
    $sql = "SELECT 
            a.name, b.id, b.byuid, b.unread, b.starred FROM test_users a 
            INNER JOIN test_private b ON a.id = b.byuid 
            WHERE b.touid='".$myid."' AND b.unread='1' 
            ORDER BY b.timesent DESC 
            LIMIT $limit_start, $items_per_page 
    "; 
  } 
     
    echo "<div class=\"nav\">Inbox</div><hr/><div align=\"left\">"; 
    echo $res; 
    $items = mysql_query($sql); 
    echo mysql_error(); 
    echo '<form action="inbox.php?do=main" method="post">'; 
    while ($item = mysql_fetch_array($items)) 
    { 
      if($item[3]=="1") 
      { 
        $iml = "<small>[_]</small>"; 
      }else{ 
        if($item[4]=="1") 
        { 
            $iml = "<small>[str]</small>"; 
        }else{ 

        $iml = "<small>[x]</small>"; 
        } 
      } 
       
      $lnk = "<a href=\"pm-$item[1].php\">$iml$item[0]</a>"; 
       
      $pmtext = mysql_fetch_array(mysql_query("SELECT text FROM test_private WHERE id='".$item[1]."'")); 
      $mprev = (htmlspecialchars(strlen($pmtext[0])<20?$pmtext[0]:substr($pmtext[0], 0, 15))); 
      //$mtext = parsepm($mprev, $sid); 
      echo '<input type="checkbox" name="check[]" value="'.$item[1].'"/>'; 
      echo "$lnk: $mprev.."; 
      echo "<br/>"; 
    } 
    echo '<br><input type="submit" name="submit" value="delete"/>'; 
    echo '</form>'; 
    echo "</div>"; 
    echo "<div align=\"center\">"; 
     
      $npage = $page+1; 
      echo "<hr/><a href=\"inbox.php?do=sendto\">Send Message</a><br/>"; 
    if($page>1) 
    { 
      $ppage = $page-1; 
      echo "<a href=\"inbox.php?do=main&page=$ppage&view=$view$exp\">«Prev</a> "; 
    } 
    if($page<$num_pages) 
    { 
      $npage = $page+1; 
      echo "<a href=\"inbox.php?do=main&page=$npage&view=$view$exp\">Next»</a>"; 
    } 
    echo "<br/>$page of $num_pages<br/>"; 
    if($num_pages>2) 
    { 
      $rets = "<form action=\"inbox.php\" method=\"get\">"; 
      $rets .= "Go To Page: <input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>"; 
$rets .= "<input type=\"submit\" value=\"Go\"/>"; 
        $rets .= "<input type=\"hidden\" name=\"do\" value=\"$do\"/>"; 
        //$rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>"; 
          
        $rets .= "<input type=\"hidden\" name=\"view\" value=\"$view\"/>"; 
$rets .= "</form>"; 
        echo $rets; 

      echo "<br/>"; 
    } 

echo "<form action=\"inbxproc.php?do=proall\" method=\"post\">"; 
      echo "Delete: <select name=\"pmact\">"; 
  echo "<option value=\"red\">Read</option>"; 
  echo "<option value=\"unrd\">Unread</option>"; 
  echo "<option value=\"ust\">Unstarred</option>"; 
  echo "<option value=\"all\">All Msg</option>"; 
  echo "</select>"; 
echo "<input type=\"submit\" value=\"Go\"/>"; 
echo "</form></div>"; 
echo "<div align=\"center\"><a href=\"inbox.php?do=crfolder\">Create New Folder</a><br/>"; 
     echo "<a href=\"inbox.php?do=myfolder\">My Folders</a><br/>"; 

    }else{ 
      echo "<div align=\"center\">"; 
      echo "You Have No Private Messages<br/><a href=\"inbox.php?do=sendto\">Send Message</a><br/>"; 
      echo "<div align=\"center\"><a href=\"inbox.php?do=crfolder\">Create New Folder</a><br/>"; 
      echo "<a href=\"inbox.php?do=myfolder\">My Folders</a><br/>"; 
      echo "</div>"; 
    } 
  ////// UNTILL HERE >> 

     
     
  echo "<div align=\"center\">"; 

$plc = mysql_fetch_array(mysql_query("SELECT saan FROM test_users WHERE id='".$uid."'")); 
echo "<br/><a href=\"$plc[0]\">Exit Inbox</a> "; 
  echo "<a href=\"index.php?do=forums\">Forums</a> <a href=\"index.php?do=chat\">Chatrooms</a> <a href=\"main.php\">"; 
echo "Home</a><hr/><div class=\"footer\">$mysite</div>"; 
  echo "<br/>Script Timer "; 
$load = microtime(); 
print (number_format($load,2)); 
echo " sec"; 

 echo "</div>"; 
  echo "</body>"; 
  }  

Creator of Epix.Mobi

Keep an Eye on us Big things coming soon!!!! Need something for your site hit me up here http://coding-talk.com/forum/main-forums/marketplace/153110-free-features-for-your-wapsite

arnage Lead · 811 posts #10

ACIDCORE wrote: every time i try to check and delete a msg it always shows 0 msg successfully deleted. i dont know where is my error here. here is my code:

echo "<head>";
  echo "<title>My Messages</title>";
  echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$test[0]\"/>";
  echo "</head>";
 echo "<meta http-equiv=\"refresh\" content=\"20; URL= inbox.php?do=$do&rid=$rid\"/>";
  addonline(getuid_sid($sid),"User Inbox","");
    echo "<div align=\"center\"><div class=\"top\">Messages</div>";
    echo getshoutbox($sid);
    $res = "";
  
    if($_POST["submit"])
    {
    
    $count = 0;
    
    foreach($_POST["check"] as $value)
     {
     $pmid = $value;
     
     $pminfo = mysql_fetch_array(mysql_query("SELECT text, byuid, touid, reported FROM test_private WHERE id='".$pmid."'"));
     if ($uid==$pminfo[2])
      {
      if($pminfo[3]!=1)
       {
       $yes = mysql_query("DELETE FROM test_private WHERE id='".$pmid."'");
       if($yes)
        {
       $count++; 
        }
       }
      }     
     }
     $res = "<b>$count Messages Successfully Deleted!</b><br>";   
    }
    echo "<form action=\"inbox.php\" method=\"get\">";
    echo "View: <select name=\"view\">";
  echo "<option value=\"all\">All</option>";
  echo "<option value=\"snt\">Sent</option>";
  echo "<option value=\"str\">Starred</option>";
  echo "<option value=\"urd\">Unread</option>";
  echo "</select>";
echo "<input type=\"hidden\" name=\"do\" value=\"$do\"/>";
//echo "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
echo "<input type=\"submit\" value=\"Go\"/>";
echo "</form><br/>";

    echo "</div>";
    $view = safe(cleanInput($_GET["view"]));
    //////ALL LISTS SCRIPT <<
    if($view=="")$view="all";
    if($page=="" || $page<=0)$page=1;
    $myid = getuid_sid($sid);
    $doit=false;
    $num_items = getpmcount($myid,$view); //changable
    $items_per_page= 10;
    $num_pages = ceil($num_items/$items_per_page);
    if($page>$num_pages)$page= $num_pages;
    $limit_start = ($page-1)*$items_per_page;
    if($num_items>0)
    {
      if($doit)
      {
        $exp = "&rwho=$myid";
      }else
      {
        $exp = "";
      }
    //changable sql
    if($view=="all")
  {
    $sql = "SELECT
            a.name, b.id, b.byuid, b.unread, b.starred FROM test_users a
            INNER JOIN test_private b ON a.id = b.byuid
            WHERE b.touid='".$myid."' AND b.folderid='0'
            ORDER BY b.timesent DESC
            LIMIT $limit_start, $items_per_page
    ";
  }
   else if($view=="fldr"){
    $sql = "SELECT
            a.name, b.id, b.byuid, b.unread, b.starred FROM test_users a
            INNER JOIN private_folders b ON a.id = b.byuid
            WHERE b.touid='".$myid."' b.folderid='".$folderid."' AND b.starred = '1'
            ORDER BY b.timesent DESC
            LIMIT $limit_start, $items_per_page
    ";

  }else if($view=="snt")
  {
    $sql = "SELECT
            a.name, b.id, b.touid, b.unread, b.starred FROM test_users a
            INNER JOIN test_private b ON a.id = b.touid
            WHERE b.byuid='".$myid."'
            ORDER BY b.timesent DESC
            LIMIT $limit_start, $items_per_page
    ";
  }else if($view=="str")
  {
    $sql = "SELECT
            a.name, b.id, b.byuid, b.unread, b.starred FROM test_users a
            INNER JOIN test_private b ON a.id = b.byuid
            WHERE b.touid='".$myid."' AND b.starred='1'
            ORDER BY b.timesent DESC
            LIMIT $limit_start, $items_per_page
    ";
  }else if($view=="urd")
  {
    $sql = "SELECT
            a.name, b.id, b.byuid, b.unread, b.starred FROM test_users a
            INNER JOIN test_private b ON a.id = b.byuid
            WHERE b.touid='".$myid."' AND b.unread='1'
            ORDER BY b.timesent DESC
            LIMIT $limit_start, $items_per_page
    ";
  }
    
    echo "<div class=\"nav\">Inbox</div><hr/><div align=\"left\">";
    echo $res;
    $items = mysql_query($sql);
    echo mysql_error();
    echo '<form action="inbox.php?do=main" method="post">';
    while ($item = mysql_fetch_array($items))
    {
      if($item[3]=="1")
      {
        $iml = "<small>[_]</small>";
      }else{
        if($item[4]=="1")
        {
            $iml = "<small>[str]</small>";
        }else{

        $iml = "<small>[x]</small>";
        }
      }
      
      $lnk = "<a href=\"pm-$item[1].php\">$iml$item[0]</a>";
      
      $pmtext = mysql_fetch_array(mysql_query("SELECT text FROM test_private WHERE id='".$item[1]."'"));
      $mprev = (htmlspecialchars(strlen($pmtext[0])<20?$pmtext[0]:substr($pmtext[0], 0, 15)));
      //$mtext = parsepm($mprev, $sid);
      echo '<input type="checkbox" name="check[]" value="'.$item[1].'"/>';
      echo "$lnk: $mprev..";
      echo "<br/>";
    }
    echo '<br><input type="submit" name="submit" value="delete"/>';
    echo '</form>';
    echo "</div>";
    echo "<div align=\"center\">";
    
      $npage = $page+1;
      echo "<hr/><a href=\"inbox.php?do=sendto\">Send Message</a><br/>";
    if($page>1)
    {
      $ppage = $page-1;
      echo "<a href=\"inbox.php?do=main&page=$ppage&view=$view$exp\">«Prev</a> ";
    }
    if($page<$num_pages)
    {
      $npage = $page+1;
      echo "<a href=\"inbox.php?do=main&page=$npage&view=$view$exp\">Next»</a>";
    }
    echo "<br/>$page of $num_pages<br/>";
    if($num_pages>2)
    {
      $rets = "<form action=\"inbox.php\" method=\"get\">";
      $rets .= "Go To Page: <input name=\"page\" style=\"-wap-input-format: '*N'\" size=\"2\"/>";
$rets .= "<input type=\"submit\" value=\"Go\"/>";
        $rets .= "<input type=\"hidden\" name=\"do\" value=\"$do\"/>";
        //$rets .= "<input type=\"hidden\" name=\"sid\" value=\"$sid\"/>";
         
        $rets .= "<input type=\"hidden\" name=\"view\" value=\"$view\"/>";
$rets .= "</form>";
        echo $rets;

      echo "<br/>";
    }

echo "<form action=\"inbxproc.php?do=proall\" method=\"post\">";
      echo "Delete: <select name=\"pmact\">";
  echo "<option value=\"red\">Read</option>";
  echo "<option value=\"unrd\">Unread</option>";
  echo "<option value=\"ust\">Unstarred</option>";
  echo "<option value=\"all\">All Msg</option>";
  echo "</select>";
echo "<input type=\"submit\" value=\"Go\"/>";
echo "</form></div>";
echo "<div align=\"center\"><a href=\"inbox.php?do=crfolder\">Create New Folder</a><br/>";
	 echo "<a href=\"inbox.php?do=myfolder\">My Folders</a><br/>";

    }else{
      echo "<div align=\"center\">";
      echo "You Have No Private Messages<br/><a href=\"inbox.php?do=sendto\">Send Message</a><br/>";
      echo "<div align=\"center\"><a href=\"inbox.php?do=crfolder\">Create New Folder</a><br/>";
      echo "<a href=\"inbox.php?do=myfolder\">My Folders</a><br/>";
      echo "</div>";
    }
  ////// UNTILL HERE >>

    
    
  echo "<div align=\"center\">";

$plc = mysql_fetch_array(mysql_query("SELECT saan FROM test_users WHERE id='".$uid."'"));
echo "<br/><a href=\"$plc[0]\">Exit Inbox</a> ";
  echo "<a href=\"index.php?do=forums\">Forums</a> <a href=\"index.php?do=chat\">Chatrooms</a> <a href=\"main.php\">";
echo "Home</a><hr/><div class=\"footer\">$mysite</div>";
  echo "<br/>Script Timer ";
$load = microtime();
print (number_format($load,2));
echo " sec";

 echo "</div>";
  echo "</body>";
  }

That basicly goes like this, you manage what you want and maybe you may let sql query to select. Just an example.

$delete = mysql_query('SELECT `id` FROM `test_private` WHERE `reported` != \'1\' AND `touid` != \'1\' AND `id` = '.$pmid.'');
$count = 0;
while ($del = mysql_fetch_array($delete)) {
	@mysql_query('DELETE FROM `test_private` WHERE `id` = '.$del[0].'');
$count++;
}
<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***
ACIDCORE Junior · 30 posts #11

tnx mate..i alm0st f0rgot,i hv c0nflict functi0n of it in my c0re..just lyk d other tyms.i ws so careless.i'll just use javascript 4 d checkb0x 2 avoid that..

arnage Lead · 811 posts #12

I don't understand, javascript has nothing to do with this. But doesn't matter, either for me in the future when i see lava or the like. 😉

<!DOCTYPE html PUBLIC "-//***WAPFORUM**.**RS***

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close