title: undefined offset error in php somewhere in the date and time error
body: <p>I am making a program for updating the database and by the time I clicked the update button it displays an error like this:</p>
  
  <pre><code>Notice: Undefined offset: 2 in C:\xampp\htdocs\maritime_database\students_entry.php on line 103
  
  Notice: Undefined offset: 1 in C:\xampp\htdocs\maritime_database\students_entry.php on line 103
  </code></pre>
  
  <p>it is somewhere in the line 103 and this is the code:</p>
  
  <pre><code>&lt;?php
  
  if($opr=="upd")
  {
      $sql_upd=mysql_query("SELECT * FROM students WHERE stud_id=$id");
      $rs_upd=mysql_fetch_array($sql_upd);
      list($y,$m,$d)=explode('-',$rs_upd['dob']);
  ?&gt;
  </code></pre>