
November 17th, 1999, 04:34 PM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
I have a double problem. I'm trying to set up a survey form, but a) I need to load data into more than 1 table in the database, and can't get that to work;
and b) some of the survey fields have to allow for multiple entries (series of checkboxes with "check all that apply"), and the only one that seems to be making it into the database is the last item selected.
PHP script code:
$query = "INSERT INTO programs VALUES('$program_name', '$program_district', '$program_address', '$program_city', '$program_state_prov', '$program_zip', '$program_phone', '$program_fax', '$program_email', '$program_url', '$contact_name', '$contact_title', '$contact_address', '$contact_city', '$contact_state_prov', '$contact_zip', '$contact_phone', '$contact_fax', '$contact_email', '$form_name', '$form_phone', '$form_email')";
$result = MYSQL_QUERY($query);
$query= "INSERT INTO info VALUES('$prog_descr_text', '$purpose')";
$result = MYSQL_QUERY($query);
--end code
Also, is $query some kind of reserved term? I've been able to insert into a single table using $query, but when I tried to differentiate between the 2 MYSQL_QUERY statements with different variables, that wouldn't work either.
Any help anyone can provide is greatly appreciated.
Thanks in advance!
|