View Single Post
Old 03-14-2008, 03:45 AM   #13 (permalink)
Nor
The Addict
 
Join Date: Nov 2007
Posts: 282
Thanks: 61
Nor is on a distinguished road
Default

Quote:
Originally Posted by Gareth View Post
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!
Nor is offline  
Reply With Quote