note 56696 deleted from tutorial.forms by nlopess

From: Date: Mon, 12 Sep 2005 19:47:48 +0000
Subject: note 56696 deleted from tutorial.forms by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-95076@lists.php.net to get a copy of this message
Note Submitter: corz at corz dot org ---- This was mentioned, but not really explained, and way too useful to overlook.. $_REQUEST no matter what method you used to get the variables to your page, GET, POST, or even from a cookie; that variable will be available in the $_REQUEST array. So in our form.. <form action="action.php" method="post"> <p>Your name: <input type="text" name="name" /></p> ... $_POST['name']; equals 'Joe', or whatever they entered. But so does $_REQUEST['name']. It contains exactly the same value. In effect, $_REQUEST acts as a catch-all for all the http arrays. I haven't tested what happens if a cookie and a POST variable share the same name, but if I was going to, I'd definitely use something like.. http://corz.org/beta?download=debug-unit.zip forgive the plug, but if you're starting out with php and forms, you *need* something like this. have fun! ;o) (or

« previous php.notes (#95076) next »