<\?PHP// get single, named posted variables from previous web pageif (isset($_REQUEST['username'])) {$username = $_REQUEST['username'];// you may prefer to have addslashes() in here...} else {$username = "default";}?>
Each input variable will now be a meaningful PHP variable of the same name.
More to follow - with escape characters and arrays too...
But, how about this for simplcity:
//Now ANY and ALL variables posted will be set up for you to use as you wish!
// parse the $_REQUEST vars
foreach($_REQUEST as $varname => $input) {
${$varname} = $input;
}
No comments:
Post a Comment