Hey Thomas, sorry to bother you again,
I ran a debug that would echo the query when I submit the form. Here is what it displays:
INSERT INTO host (host_id, time, ip, company_name,company_url,contact_first,contact_last,contact_email,address_1,address_2,city,zip,state,country,established,phone,fax,info,platform,type,cp,support,payment) VALUES ('', '1093196872', 'xxx.xxx.xxx.xxx', 'test','','','','','','','','','','-- Datacenter Location --','-- Select A Year --','','','','2_3','Array','','','')
so it just stores the checkboxes of the Type of Hosting as 'Array.'
I think the problem is with this:
$arrValuesType = array();
for ($i=0;$i<count($fields);$i++) {
$valType = "";
if ($fields[$i] == "type") {
// use platform data
$valType = $type;
} else {
// use current post data
$valType = isset($_POST[$fields[$i]]) ? $_POST[$fields[$i]] : "";
}
// escape the stuff so submitted values don't break up the query
$valType = "'".mysql_escape_string($valType)."'";
$arrValuesType[] = $valType;
}
// create value list and field list
$values = implode(",",$arrValues);
$fieldlist = implode(",",$fields);
Especially with the last couple of lines. Shouldn'i I have $arrValuesType somewhere in there? I mean I should implode the selected thing, shouldn't I?
thanks