foreach causing error in viewer_functions.php at 1030

2 posts by 2 authors in: Forums > CMS Builder
Last Post: July 27, 2015   (RSS)

By markr - July 26, 2015

This loop...

foreach (@$_POST['roomSelect'] as $key => $value) {

    $update = mysql_query("
      UPDATE $studentTable
      SET `room` = '$value'
      WHERE `recid` = '$key'
      LIMIT 1
      ") or die(mysql_error());

    } // end foreach

...is updating db ok but it's throwing an error...

Notice: Undefined offset: 0 in /home/spapwc5/public_html/cms/lib/viewer_functions.php on line 1030

Am I missing with CMS functions? Any help would be appreciated.