note 58784 deleted from function.strstr by thiago
| From: | thiago@php.net | Date: | Tue, 28 Oct 2008 13:50:50 +0000 |
| Subject: | note 58784 deleted from function.strstr by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-145876@lists.php.net to get a copy of this message | ||
Note Submitter: nospam AT thenerdshow.com
----
It is a good practice to ensure dropdown menu submissions contain ONLY expected values:
$i=(isset($_POST['D1']))?$_POST['D1']:$o="Monday";
if (!stristr('Monday Tuesday Wednesday Thursday Friday Saturday Sunday',$i)) die();
(do database query)
This should protect against all known and unknown attacks, injection, etc.
User submitted should be cleaned through other functions. See info under mysql_query