The code I am using works fine on another page except the only difference is the query so I'm thinking that must be the problem so can anyone see any problems with this query??
(I'm THINKING the error might be with the way I implement the $region_id and $secure_parking variables which are defined higher up in the php file that this query is in, but I've tried different variations and can't get it to work at all.)
Either help with the query would be good, or otherwise some way to test why data isn't going into the database but no error is being displayed would be great. Thanks in advance.
Code: Select all
query = "INSERT into marinas (marina_name, abn, region_id, contact_first_name, contact_last_name, street_address,
suburb, state, postcode, postal_address, postal_state, postal_postcode, telephone_work, telephone_fax,
telephone_mobile, telephone_emergency, email, secure_parking)
VALUES ('{$_POST["marina_name"]}',
'{$_POST["abn"]}',
'$region_id',
'{$_POST["contact_first_name"]}',
'{$_POST["contact_last_name"]}',
'{$_POST["street_address"]}',
'{$_POST["suburb"]}',
'{$_POST["state"]}',
'{$_POST["postcode"]}',
'{$_POST["postal_address"]}',
'{$_POST["postal_state"]}',
'{$_POST["postal_postcode"]}',
'{$_POST["telephone_work"]}',
'{$_POST["telephone_fax"]}',
'{$_POST["telephone_mobile"]}',
'{$_POST["telephone_emergency"]}',
'{$_POST["email"]}',
'$secure_parking')";