This is a discussion on php Form submission help within the MySQL Database forums, part of the Database Forums category; I have a php form that is inserting it's field values into a mysql db table. the form has ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have a php form that is inserting it's field values into a mysql db
table. the form has 8 fields, and the db has 9, the extra field in the db is an ID field that I have set to auto increment. Problem is, I can't insert the data from the form into the table because the number of fields is mis-matched. Here is my query command from the webpage mysql_query("INSERT INTO `preauth` VALUES ('$eventname', '$name', '$phone', '$website', '$starts', '$ends', '$location', '$price')"); everything works fine if I delete the id field from the table. but I need it to be there to delete the table row later. Any help would be greatly appreciated. |
|
|||
|
On 2006-12-11, shadow1778@gmail.com <shadow1778@gmail.com> wrote:
> Problem is, I can't insert the data from the form into the table > because the number of fields is mis-matched. Simply define the fields which need to be filled. > Here is my query command from the webpage > > mysql_query("INSERT INTO `preauth` VALUES ('$eventname', '$name', > '$phone', '$website', '$starts', '$ends', '$location', '$price')"); I don't know your actual column names, but think something like INSERT INTO preauth (eventname, name, phone, website, starts, ends, location, price) VALUES('$eventname', '$name',$phone', '$website', '$starts', '$ends', '$location', '$price'); -- Riemer Palstra Amsterdam, The Netherlands riemer@palstra.com http://www.palstra.com/ |
![]() |
| Thread Tools | |
| Display Modes | |
|
|