data formats

From: Date: Sun, 20 Feb 2011 21:29:33 +0000
Subject: data formats
Groups: php.db 
Request: Send a blank email to php-db+get-47688@lists.php.net to get a copy of this message
I'm submitting form data which is a mixture of checkboxes and text inputs, some of which are integers and a couple text based. I am retrieving the data as follows: $var = (int)!empty($_POST['var']); for checkboxes, $var = (int)$_POST['var']; for integers and $var = mysql_real_escape_string($_POST['var']); Is this correct?

« previous php.db (#47688) next »