Fatal error: Uncaught Error: Call to undefined function mysql_real_escape_string() in php7
# codeIgniter use mysql_real_escape_string() instead.database connection issue
Answer:
Use $this->db->escape_str($name);
OR
$new_name = $this->db->escape_str($this-> input->post(‘new_name’));