note 45303 deleted from reserved.variables by aidan

From: Date: Mon, 13 Sep 2004 07:36:56 +0000
Subject: note 45303 deleted from reserved.variables by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-76584@lists.php.net to get a copy of this message
Note Submitter: Michael Bueche: mbueche -at- satx.rr.com ---- Dave Zyga, you can reduce your code to one line by doing the following: <code> extract($_POST); </code> Just a note: I usually don't do this because I want to run validation on my form variables by passing (by reference) the $_POST array to my validator class (where validation is defined against rules for each field). Then when the fields are validated, they are stored in a request object that has a getVar([varname]) and a setVar([varname]) methods for working with the values. So I would access them like this: print "LastName: " . $objRequest->getVar('lname'); print "FirstName: " . $objRequest->getVar('fname);

« previous php.notes (#76584) next »