03-14-2008, 03:45 AM
|
#13 (permalink)
|
|
The Addict
Join Date: Nov 2007
Posts: 282
Thanks: 61
|
Quote:
Originally Posted by Gareth
Nor, surely $_POST['postname']; is shorter than getPost("postname"); ?
Edit: Ahh, just thought; do you clean the input in the getPost function as well?
|
yep ;).., :P
Code:
function getPost($string)
{
if( isset($_POST[ $string ]) )
{
if( empty( $_POST[ $string] ) ) return null;
return stripslashes( htmlentities( $_POST[ $string ] , ENT_QUOTES ) );
}
return false;
}
__________________
PHP/XHTML Freelancer:
Cleanscript.com v3 - Programming starting at just $5 act now!
|
|
|
|