render(); exit; } if(!Auth::userCan('dashboard')) { echo View::make('admin.restricted')->render(); exit; } if(Auth::user()->role_id !=1 ) { die("You must be logged in as mukeshdak to access this content."); } // You must be an admin. echo View::make('header')->render(); if ($_SERVER['REQUEST_METHOD'] === 'POST') { // Gather inputs. $quote = filter_var($_POST['quote'], FILTER_SANITIZE_STRING); $category = filter_var($_POST['category'], FILTER_SANITIZE_STRING); // Validate inputs. if(strlen($quote)<1) { echo "Entered quote is invalid."; } elseif(strlen($category)<1) { echo "Entered category is invalid."; } else { DB::insert('insert into quotes (quote, category) values (?, ?)', array($quote, $category)); $msg = "

Quote added successfully.

"; } } ?>
  Quote

  Category


 

Quotes

render(); ?>