title: PHP Notice: Undefined offset
body: <p>I want update multiple rows using checkbox. my script works, but showing error messages after ini_set display_errors</p>
  
  <p>Here is code:</p>
  
  <pre><code>$count=mysql_num_rows($result);
  if (isset($_POST['submit'])) {
      $checked = $_POST['checkbox'];
      for ($i = 0; $i &lt; $count; $i++) {
          $result = mysql_query("UPDATE trace SET status='Delivered' WHERE id='$checked[$i]'") or die(mysql_error());
      }
  }
  </code></pre>
  
  <p>It's showing Notice: Undefined offset row number</p>
  
  <p>What is wrong?</p>