adam291086 Posted April 22, 2009 Share Posted April 22, 2009 Hello, i am using codeignighter frameword here is my class <?php class UserForm extends Controller { function index() { $this->load->helper(array('form', 'url')); $this->load->library('form_validation'); $this->form_validation->set_rules('username', 'Username', 'required'); $this->form_validation->set_rules('password', 'Password', 'required'); if ($this->form_validation->run() == FALSE) { $this->load->view('login'); } else { $query_username = $_POST['username']; // query username $query_password = $_POST['password']; // query password $query = $this->db->query("SELECT * FROM persons WHERE username='".$query_username."' AND password='".$query_password."'"); foreach ($query->result() as $row) { echo $row->username; } } } } ?> i am getting the error message Fatal error: Call to a member function on a non-object in /homepages/12/d214897219/htdocs/adam/framework/system/application/controllers/userform.php on line 23 and i dont know why? Link to comment https://forums.phpfreaks.com/topic/155189-solved-framework-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.