A PHP Error was encountered Severity: Notice Message: Undefined variable: company_n |
I'd suggest using row() at the end of your model query instead of result_array() because it's not returning a single object, it's returning an array of objects.
so, you've two options... 1: in your model: PHP Code: $query = $this->db->where('email', $login_email)->get('mytable')->limit(1)->row(); PHP Code: // Controller It's then converted to $company_name, $user_name, $IP_Address, etc in your view. ----- Option 2 (while this will work, it's ugly and will cause confusion later) Pass $vendor[0] in your view call. PHP Code: $this->load->view('vendor_dashboard',$vendor[0]); then access as $company_name, $user_name, etc in your view... |
Messages In This Thread |
A PHP Error was encountered Severity: Notice Message: Undefined variable: company_n - by prtk418 - 07-03-2016, 02:18 PM
RE: A PHP Error was encountered Severity: Notice Message: Undefined variable: company_n - by pdthinh - 07-03-2016, 06:32 PM
RE: A PHP Error was encountered Severity: Notice Message: Undefined variable: company_n - by enlivenapp - 10-13-2016, 07:35 PM
RE: A PHP Error was encountered Severity: Notice Message: Undefined variable: company_n - by enlivenapp - 10-13-2016, 07:29 PM
|