Validating Data
2/28
Topics
Testing Values
•
Turn off
register_globals
and rely on
$_GET
,
$_POST
,
$_COOKIE
, and
$_REQUEST
•
Test submitted data for expected syntax:
<?php
if (
is_numeric
(
$_POST
[
'age'
])) { ... }
?>
<?php
if (
strlen
(
trim
(
$_GET
[
'address'
]))) { ... }
?>