On Tuesday 16 April 2002 04:13, Alex Francis wrote: > I am trying to insert event dats into a database and to make sure the user > puts the date in the correct format. I am now trying to collect the > information from the three fields and insert it into one field. > > code as follows: $eventdate = array ("eventyear", "eventmonth", > "eventday"); > > when I insert it into the database like: $query = "INSERT INTO $tablename4 > VALUES ('0', '$entername', '$date', '$eventdate', '$eventheading', > '$eventbody' )"; > > for the $eventdate variable the word "array" is inserted. > > Could someone please tell me where I am going wrong.
You're trying to insert an array into something which is expecting a string. You should probably be concatenating your three fields into one string, something like: $eventdate = $eventyear . $eventmonth . $eventday; The exact format would depend on what field type your "eventdate" is. -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* I'm going to give my psychoanalyst one more year, then I'm going to Lourdes. -- Woody Allen */ -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php