title: activate more than a user at once
body: <p>I'm working on my project for my school, I made activating a user account work, if the admin want to activate one user at a time, 
  but whenever the admin wants to update multiple record at once, it won't work
  I tried to include the update SQL inside a foreach loop, but it gave me an error: invalid argument for foreach()
  pleas guys help me, </p>
  
  <pre><code> if(isset($_POST['activate'] )){
  $impid = implode(',', $_POST['SSU']);
  
  // for each .. to update more than one at once. 
  foreach($impid AS $i){
  $sql = "UPDATE Accounts SET Activated = '".$_POST['activate']."' WHERE SSU IN('" . $i . "') ";
  $result = mysqli_query($dbCIE, $sql) or die(mysqli_error($dbCIE));
                              }
  
   //  to test. if anything got effected.. 
   if (mysqli_affected_rows($dbCIE) &gt; 0) {
    echo "&lt;script type='text/javascript'&gt; alert('Successfully Updated ')&lt;/script&gt;";
            }
      else {
       echo "&lt;script type='text/javascript'&gt; alert('Failed to  Update ')&lt;/script&gt;";
              } // end the test. 
  
        }else{echo "&lt;script type='text/javascript'&gt; alert(' Select Whether to Activare Or Deactive ')&lt;/script&gt;";}
       }
       } // end of first if $_post[update]
  </code></pre>