How to change password in CodeIgniter?

Today, We want to share with you change password in codeigniter.In this post we will show you how to send password reset link in codeigniter?, hear for check old password and updating a new password using codeigniter we will give you demo and example for implement.In this post, we will learn about forgot password in codeigniter with an example.

How to Make Forgot Password in Codeigniter?

Forms.php (Controller)

		/*load Model*/
	public function update_new_set_password()
			$que=$this->db->query("select * from client_sign_in where id='$session_id'");
			if((!strcmp($password_old, $pass))&& (!strcmp($freshpassword, $second_time_verify_password))){
				echo "Good Luck, Password changed successfully !";
					echo "sorry, Invalid";

CodeIgniter Model


db->query("select * from client_sign_in where id='$session_id'");
	function update_new_set_password($session_id,$freshpassword)
	$update_pass=$this->db->query("UPDATE client_sign_in set pass='$freshpassword'  where id='$session_id'");

CodeIgniter View


Login Form -

Change Password

Run the program on your browser with URL:


I hope you get an idea about forgot password gmail in codeigniter.
I would like to have feedback on my blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment