// collapse to string
$values = implode(', ', $values); // collapse to string
- Kevin
- Original Message -
From: "st" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 04, 2003 12:19 PM
Subject: [PHP] Re: Scroll through values sent from a form
thanks for your reply but it doesn't work, i get the following output:
INSERT INTO Table (Object, Object, Object, Object, ) Values (, , , , )
any ideas?
"Bobby Patel" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> $fields='';
> $values='';
>
> foreach ($_POST as $field -> $value)
$fields='';
$values='';
foreach ($_POST as $field -> $value) {
$fields .= $field.", ";
$values .=$value.", ";
}
$fields = substr ($fields, -2); // strip off last comma and space
$values = substr ($values , -2); // strip off last comma and space
$query = "INSERT INTO $_GET[table_name] (".$
3 matches
Mail list logo