I am currently updating a section of code that uses mysql
currently the escape string is structured like this: $product_name = mysql_real_escape_string(trim($_POST['product_name']));
and works fine.
My issue is when I change the above string to $product_name = mysqli_real_escape_string($database, (trim($_POST['product_name'])));
and declare the following: $database = $this->load->database();
above it I get the error that its NULL
How do I escape a string with CI?