foreach ($_REQUEST as $i => $v) { $r[join('.', explode('_', $i))] = $v; //convert _ back to . } $court = @$r['0']; $members = array(); for ($i0 = 0; isset($r['1.' . $i0]); $i0++) { $members[$i0] = @$r['1.' . $i0 . '']; } $sessions = array(); for ($i0 = 0; isset($r['2.' . $i0]); $i0++) { $sessions[$i0] = @$r['2.' . $i0 . '']; } $Panel = new Panel($ID, $court, $members, $sessions); if ($Panel->save() !== false) { die('ok:' . $_SERVER['PHP_SELF'] . '?Panel=' . urlencode($Panel->getId())); } else { die(''); } exit; // do not show the interface } $buttons = ""; if (isset($_REQUEST['new'])) { $new = true; } else { $new = false; } if (isset($_REQUEST['edit']) || $new) { $edit = true; } else {