Scroll through values sent from a form
| From: | st | Date: | Tue, 04 Mar 2003 18:58:33 +0000 |
| Subject: | Scroll through values sent from a form | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-138150@lists.php.net to get a copy of this message | ||
Hi,
Is it possible to scroll through values posted from a form using PHP? Here
is my problem: I have a form on a page which is created dynamically from the
number of fields in a particular table, so when I POST the data how do I
create the INSERT statement? I feel this will be awkward due to the
construction of the INSERT statement and I would be very grateful for
anyone's input. The form names are the same as the field alues in the
table...
It will need to be something like
$query = "INSERT INTO $_GET[table_name] ("
while (more Form Fields){
$query = $query + "'form fieldname'";
}
$query = $query + ") VALUES (";
while (more POST Values){
$query = $query + "POST Value";
}
$query = $query + ")";
I hope this makes sense to the reader!
Thanks