|
Posted by Michael Hulse on 12/04/05 00:14
Hello,
This is my first time posting to the list... I hope this question is
not too silly, I am definitely not a guru at PHP.
Anyway, in one of my latest projects, I find myself using this bit of
code quite a bit:
if((isset($_REQUEST['sub'])) && (!empty($_REQUEST['sub']))) {
... code here...
}
Can I write a function that would make my life easier? Maybe something
like this (not tested):
//////// function security_check():
function security_check($x) {
$error = false;
if((isset($x)) && (!empty($x))) {
$error = false;
return $error;
} else {
$error = true;
return $error;
}
}
Or, is it perfectly valid and secure to use @, like so:
@... code here...
I know that it completely depends on the what one is trying to
accomplish in ones scripts, but any guidance and/or suggestions would
be greatly appreciated.
Thanks, I really appreciate your time.
Cheers,
Micky
--
¸.·´¯`·.¸¸><(((º>`·.¸¸.·´¯`·.¸¸><((((º>
·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·.¸¸.·´¯`·..¸¸><((((º>
`·.¸><((((º>¸.·´¯`·.¸¸><((((º>
[Back to original message]
|