Welcome Guest, Not a member yet? Register   Sign In
Is htmlspecialchars & mysql_real_escape_string necessary with the input class ?
#1

[eluser]pyrokinesis[/eluser]
Hi everyone,

I'm wondering are the 'htmlspecialchars' & 'mysql_real_escape_string' functions necessary (post input into DB) when using the CI input class or will the input class do it all for me already?

Code:
$data = ci()->input->post($element);
if(!empty($data))
{
  $data = htmlspecialchars($data);
  $data = mysql_real_escape_string($data);
  return $data;
}

Thanks Smile


Messages In This Thread
Is htmlspecialchars & mysql_real_escape_string necessary with the input class ? - by El Forum - 06-23-2011, 05:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB