-1

Is there any function in codeigniter similar to

mysql_real_escape_string()

I have tried $this->db->escape() but no luck

below code works

$surname = mysql_real_escape_string($request['3']);  // O'relley-max

but other CI method not working any suggestion. I need to know what CI method escaping string for a variable

I know if you use validation rules xss_clean it workes but i don't want to apply rules

Rakesh Sharma
  • 13,680
  • 5
  • 37
  • 44

1 Answers1

3

You can add a parameter

$this->input->post('item',true)

To avoid any script and it add up extra security to the input value its avoids the xss scripting check the above link for proper documentation

Check for details

saurabh kamble
  • 1,510
  • 2
  • 25
  • 42