<?php global $wpdb; $msg = ""; $msg = "Can not add a seat becamse seating chart doens't exists."; $seating_chart_id = 0; $seating_chart = null; if (isset($_REQUEST['seating_chart_id'])) { $seating_chart_id = $_REQUEST['seating_chart_id']; $seating_chart = $wpdb->get_row("select * from " . EVENTS_SEATING_CHART_TABLE . " where id = {$seating_chart_id} "); if ($seating_chart != NULL) { $msg = ""; if (isset($_POST['insert_seat'])) { $cls_seating_chart = new seating_chart(); $result = $cls_seating_chart->insert_seat($seating_chart_id, $_POST); if ($result !== false) { $msg = "Seat created"; } else { $msg = "Error: [" . mysql_errno() . "] - " . mysql_error(); } } } } else { echo "Sorry no seating chart was selected"; exit; } ?> <!-- START: Step Two: Fluid Left --> <div class="wrap"> <div id="icon-options-event" class="icon32"></div>