note 112374 deleted from function.isset by googleguy
| From: | googleguy@php.net | Date: | Sat, 08 Jun 2013 04:42:26 +0000 |
| Subject: | note 112374 deleted from function.isset by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-195106@lists.php.net to get a copy of this message | ||
Note Submitter: CertaiN
----
<?php
The safest way to receive input string.
Example:
<?php
if (isset($_POST['var']) && is_string($var = $_POST['var']) &&
$var !== '') {
echo "Input string: {$var}\n";
} else {
echo "No input\n";
}
?>