What would be a better way of doing the following

Posted by thecoshman on Stack Overflow See other posts from Stack Overflow or by thecoshman
Published on 2010-04-21T12:06:07Z Indexed on 2010/04/21 12:13 UTC
Read the original article Hit count: 207

Filed under:
|
if(get_magic_quotes_gpc())
{
  $location_name = trim(mysql_real_escape_string(trim(stripslashes($_GET['location_name']))));
}
else
{
  $location_name = trim(mysql_real_escape_string(trim($_GET['location_name'])));
}

That's the code I have so far. seems to me this code is fundamentally ... OK. Do you think I can safely remove the inner trim(). Please try not a spam me with endless version of this, I want to try to learn how to do this better.

© Stack Overflow or respective owner

Related posts about php

Related posts about Performance