(06-13-2019, 01:35 AM)hc-innov Wrote: syntax error!
PHP Code:
function search(){
var_dump($this->input->post());
exit;
if ($this->input->post('submit'){
die('Hello');
....
} else {
....
}
and post the result
Hmm, another Syntax Parse Error.....
Modified Function
Code:
function search(){
var_dump($this->input->post());
exit;
if ($this->input->post('submit'){
die('Hello');
$search = $this->input->post('query');
$results = $this->recipe_model->search($search);
$data = array(
'title' => "Shirley's Recipes : Search Results",
'columns' => array('toc', 'recipe_search'),
'recipes' => $results,
);
$this->load->view('includes/template', $data);
}
else{
redirect('recipe');
}
}
Error
Code:
An uncaught Exception was encountered
Type: ParseError
Message: syntax error, unexpected ';'
Filename: /home/www/shirleysrecipes.100webspace.net/application/controllers/Recipe.php
Line Number: 55
Backtrace:
File: /home/www/shirleysrecipes.100webspace.net/index.php
Line: 315
Function: require_once
Line 55: die('Hello');