[eluser]earlyriser[/eluser]
I have added the success page. It still doesn't work with the IF clause. Something must be wrong there because nothing in the if o else is executed
Code:
//check if the wine is in database
$this->db->select('*');
$this->db->from('wines');
$this->db->where('name', $_POST['name']);
$data['query']= $this->db->get();
if ($query->num_rows() > 0) //if it was found in wines.name