Coding Help Please

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

    #16
    use while() to do it ill post my code its for a different script though but you will get the idea

    PHP Code:
    ///// NOTIFY ALL MEMBERS/////
    else if ($mode == "notifyall" && IsHeadAdmin($uid))
    {
    $title "Notify all members";
    $maxlength 255;
    $m $mode;
    $input_title "Message:";
    $button "Send";
    $process get_var("process");
    if (
    $process == 1)
    {
    $var get_var("var");
    if (
    IllegalChars($var)) $msg "<span class=\"error\"><img src=\"./images/error.gif\" alt=\"[x]\"/>Illegal chars found!</span><br/>";
    else if (
    strlen($var) == 0$msg "<span class=\"error\"><img src=\"./images/error.gif\" alt=\"[x]\"/>Message cannot be blank!</span><br/>";
    else
    {
    $query query("*",members,"id != $uid AND banned = 'N' ORDER BY id");
    if (
    mysql_num_rows($query) > 0)
    {
    while(
    $row mysql_fetch_array($query))
    {
    sendinbox($uid,$row['id'],"N","notice to all users",$var);
    }
    $msg "<span class=\"ok\"><img src=\"./images/ok.gif\" alt=\"[ok]\"/>Message has been sent to all members!</span><br/>";
    }
    else 
    $msg "<span class=\"error\"><img src=\"./images/error.gif\" alt=\"[x]\"/>Unable to send message!</span><br/>";
    }
    }
    $what = Array("msg","title","maxlength","size","m","input_title","var","input2","button");
    $with = Array($msg,$title,$maxlength,"",$m,$input_title,$var,"",$button);
    Template($what,$with,"admindialog");
    exit();

    Comment

    Working...
    X