Welcome Guest, Not a member yet? Register   Sign In
MYSQLI escape string
#1

[eluser]jzmwebdevelopement[/eluser]
I am currently updating a section of code that uses mysql currently the escape string is structured like this:
Code:
$product_name = mysql_real_escape_string(trim($_POST['product_name']));
and works fine.

My issue is when I change the above string to
Code:
$product_name = mysqli_real_escape_string($database, (trim($_POST['product_name'])));
and declare the following:
Code:
$database = $this->load->database();
above it I get the error that its NULL

How do I escape a string with CI?


Messages In This Thread
MYSQLI escape string - by El Forum - 06-15-2013, 02:26 PM
MYSQLI escape string - by El Forum - 06-16-2013, 01:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB