note 47150 deleted from tutorial.forms by tularis

From: Date: Thu, 04 Nov 2004 16:08:54 +0000
Subject: note 47150 deleted from tutorial.forms by tularis
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-79617@lists.php.net to get a copy of this message
Note Submitter: kd dot SP*AM at SP*AM dot downsfam dot net ---- You may wish to know if a request for a PHP file came as a result of a POST or as a normal request. Usually the first time a user brings up a form there is no POST data and on most subsequent trips there is POST data. You can determine if there is POST data by using the ISSET() function of any particular post variable, as in: <?php if (isset($_POST['any_form_variable'])) { statement; } ?> To make it generic, put a hidden input onto your forms, and always use the same name, such as: <form.... <input type="hidden" name="post_trap" value="x"> <?php if (isset($_POST['post_trap'])) { statement; } ?> </form> ---- Reason: useless example

« previous php.notes (#79617) next »