Bug #1425 Updated: $HTTP_POST_VARS and $HTTP_GET_VARS get all form values in strings.

From: Date: Wed, 19 May 1999 02:00:23 +0000
Subject: Bug #1425 Updated: $HTTP_POST_VARS and $HTTP_GET_VARS get all form values in strings.
Groups: php.dev 
Request: Send a blank email to php-dev+get-5772@lists.php.net to get a copy of this message
ID: 1425 Updated by: rasmus Reported By: ukiseal@hotmail.com Status: Closed Bug Type: Other Assigned To: Comments: Hardly a bug. That's by design. What if someone sticks all numbers in a text field. Then by your logic you wouldn't put quotes around it and the SQL database would throw an error. You need to go by the type of the field you are putting data into, not by the type of data that you are trying to put in. If you really do need to determine the type of the contents of a variable, there are plenty of functions that let you do that. Something like: strspn($string,"1234567890.") would be a good start. Full Bug description available at: http://bugs.php.net?id=1425 -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#5772) next »