note 50033 deleted from language.variables.variable by philip

From: Date: Wed, 16 Mar 2005 01:06:12 +0000
Subject: note 50033 deleted from language.variables.variable by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-86510@lists.php.net to get a copy of this message
Note Submitter: David - golgotha at toughguy dot net ---- A note regarding the code posted by Øyvind Vestavik, NTNU Norway for dynamic html forms with unknown number of entries.. After banging my head against a brick wall with this code, wondering why it wouldn't work on my local server and would on my host.. for the code to work as written, register_globals must be on.. To make the code work as written, either extract($_POST), or specifically reference the required variables by their propper names - ie $nr_entries = $_POST['nr_entries'] For the dynamic entries, (ie $_POST['name_1'] etc) reference them like so: <?php $temp = "name_$i"; $value = $_POST[$temp]; ?> ...thereby removing the reliance on variable variables anyway. regards, David

« previous php.notes (#86510) next »