https://www.icyphoenix.com/viewtopic.php?f=17&t=9351&p=59912#p59912
-----------------------------------
mort
Mon 24 Nov, 2014 11:48

More Questions About Sanitizing?
-----------------------------------
Hey fella's,

I'm sure I read somewhere that this abs((int) is deprecated

[code linenumbers=false]$userid = abs((int) $_POST['userid']);[/code]

Would this be its replacement?

[code linenumbers=false]$userid = intval($_POST['userid']);[/code]

And things like these, do they need to be protected?

flag ID is an int
The rest are either names or files?

[code linenumbers=false]$flagID = $row['flag_id'];

$flag_name = $row['flag_name'];
$flag_image = $row['flag_image'];

$template_name = $row['template_name'];
$style_name = $row['style_name'];[/code]

So what's the go - Do they all need to be done with either intval( for integers and either mysql_real_escape_string( for the names and files or is something else more appropriate for the names and files?


