How Can i Insert data In DataBase |
First, don't use extract() on $_POST, there's even a warning on the manual page telling you not to do that. So, in your controller's index() method, do something like this:
PHP Code: $username = $this->input->post('username'); It's a little confusing for your model to have an update method which just performs an insert, but I'll assume that you're simplifying your code. Second, you need to protect the password, not just insert it into your database. So, before inserting the data, you should use PHP's password_hash() function. Then, when you need to verify the password for user login, you'll have to use the password_verify() function. |
Messages In This Thread |
How Can i Insert data In DataBase - by viveksoftcomp - 10-16-2015, 06:07 AM
RE: How Can i Insert data In DataBase - by mwhitney - 10-16-2015, 08:46 AM
RE: How Can i Insert data In DataBase - by pdthinh - 10-16-2015, 10:56 AM
|