when echoing an array from a mysql query, console sends me an error that it needs jquery.
my problem originally was how to output the one query result from an array. I found a solution where using $arrayName[index][index] should do it but when I tried it the browser console shows an POST http://localhost:8080/logInCon/validate_LogIn 500 (Internal Server Error)
this is the query function
Model:
public function logInCheck($uname, $psswrd)
{
$log = $this->db->query("SELECT COUNT(*) AS 'verified' FROM `users` WHERE `uname` = '$uname' AND `pwd` = '$psswrd' LIMIT 1;");
return $log->result();
}
this is results Controller:
public function validate_LogIn()
{
$uname = $this->input->post('uname');
$pass = $this->input->post('pass');
$this->load->model("accsModel");
$data = $this->accsModel->logInCheck($uname, $pass);
echo $data[0]['verified'];
}
I want to get that one value inside $data