where a.stud_id = b.stud_id AND a.stud_id = c.stud_id AND a.stud_id = ?'; $select = DB::getInstance()->query($sql, array(Input::get('scan-stud'))); if ($select && $select->count() > 0) { Session::put('select_stud', $select->result()); Session::exists('verify_error') ? Session::delete('verify_error') : ''; } else { Session::put('verify_error', 'Please Try Again'); } $current_url = Cryption::decryt64(Session::get("current_url")); Redirect::to($current_url); } else { if (Input::get('removes') == 1 && Session::exists('select_stud')) { $current_url = Cryption::decryt64(Session::get("current_url")); $inv->remove_stud(); Redirect::to($current_url); } else { if (Input::get('check')) { $code = Input::get('check'); if ($code == "back") { $results = DB::getInstance()->query("Select food_type,food_image from food_tbl group by food_type"); $obj = $results->result(); echo "<div class='title'>Choose category</div>"; for ($i = 0; $i < $results->count(); $i++) { echo "<label class='main' id='" . $obj[$i]->food_type . "'>"; echo "<div class='thumb'>"; echo "<img src='" . $obj[$i]->food_image . "'>"; echo "</div>"; echo "<span>" . $obj[$i]->food_type . "</span>"; echo "</label>";