Reply to Security/$_REQUEST vars... How do you do it?

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация