meaning INSERT INTO table (first_name,middle_name,last_name,suffix) VALUES($an_array)
no. that is not possible. you do actually have to write it out.. INSERT INTO table (first_name,middle_name,last_name,suffix) VALUES('$name[0]', '$name[1]', '$name[2]', $name[3]) I dont understand why you have these in arrays if they are only simple text inputs. it'd be much easier to understand your code visually if you had the name of each field actually descriptive of the content in it. It is also not valid html to have [ ]'s in the name parameter, I believe. ----- Original Message ----- From: "Ubaidul Khan" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 27, 2001 9:45 AM Subject: [PHP-DB] inserting mysql data using php array??? Hi I am running Apache 1.3.20 with MySQL 3.23.41, and PHP 4.0.6, on Linux Mandrake 8.1. I am trying to access a MySQL database from a PHP script. I have a html form, that takes input in an array (ie. name[0], name[1], name[2], name[3], these fields represent first_name, middle_initial, last_name, and suffix in the database). What I would really like to do is, take this array of data and insert each element in the corresponding column, in the database. Is it possible to insert each element of the array into the database, using an array, instead of typing out each value? -- Thanks -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]