application/controllers/Dashboard.php
//inserting new category of tourist spots to the database
inserting new category of tourist spots to the database
inserting new category of tourist spots to the database
public function addCategory(){
	 		if($_POST['category'] != ""){
	 			$data['name'] = $_POST['category'];
	 			$ret = $this->dashboard_model->Add($data,'spot_category');
	 		}else{
	 			$ret = "Category name must not be empty!";
	 		}
	 		echo $ret;
	 	}
public function addCategory ( ) { if ( $ _POST [ 'category' ] != " " ) { $ data [ 'name' ] = $ _POST [ 'category' ] ; $ ret = $ this -> dashboard_model -> Add ( $ data , 'spot_category' ) ; } else { $ ret = " Category name must not be empty! " ; } echo $ ret ; }
inserting new category of tourist spots to the database
inserting new category of tourist spots to the database