Hi, I am getting this error with this code but i cannot see anything wrong with it, or am i missing something? $first_name = mysql_real_escape_string($_POST['first_name']); $last_name = mysql_real_escape_string($_POST['last_name']); $gender = mysql_real_escape_string($_POST['gender']); $seeking = mysql_real_escape_string($_POST['seeking']); $wanting = mysql_real_escape_string($_POST['wanting']); $birthday = mysql_real_escape_string($_POST['birthday']); $country = mysql_real_escape_string($_POST['country']); $zip_postcode = mysql_real_escape_string($_POST['zip_postcode']); $username = mysql_real_escape_string($_POST['username']); $password = mysql_real_escape_string($_POST['password']); $sdate = date("Y-m-d"); mysql_query("INSERT INTO `users` (first_name, last_name, gender, seeking, wanting, birthday, country, state_county, province_town, zip_postcode, phone_home, phone_home_show, phone_mob, phone_mob_show, email_address, introduction_title, religion, education, smoking, drinking, occupation, interests, marital_status, have_children, want_children, willing_relocate, languages, other_languages_spoken, star_sign, convenient_time, check_your_mail, possible_marriage, accept_divorced, partners_age, meeting_place, aim, yahoo, msn, icq, skype, hobbies_interests, sport, own_thing, quality_time, meeting_friends, family, sex, clothes, disco_cinema, travelling, holidays, hobbies_interests_relations, caring_partner, sex_relations, harmony_trust, love_affection, understanding, thoughtfulness, own_space, romance, loyalty, support, charming, sense_of_humour, loyal, honest, attractive, optimistical, realistic, sexy, ambitious, visionary, quiet, conservative, tolerant, curious, selfconfident, athletic, attentive, shy, sociable, dominant, creative, active, passive, domesticated, friendly, sympathetic, fond_of_children, fond_of_animals, intelligent, romantic, talkative, joyful, humble, modest, caring, respectful, generous, thoughtful, down-to-earth, sensitive, professional, business_minded, solvent, determined, successful, partner_charming, partner_sense_of_humour, partner_loyal, partner_honest, partner_attractive, partner_optimistical, partner_realistic, partner_sexy, partner_ambitious, partner_visionary, partner_quiet, partner_conservative, partner_tolerant, partner_curious, partner_selfconfident, partner_athletic, partner_attentive, partner_shy, partner_sociable, partner_dominant, partner_creative, partner_active, partner_passive, partner_domesticated, partner_friendly, partner_sympathetic, partner_fond_of_children, partner_fond_of_animals, partner_intelligent, partner_romantic, partner_talkative, partner_joyful, partner_humble, partner_modest, partner_caring, partner_respectful, partner_generous, partner_thoughtful, partner_down-to-earth, partner_sensitive, partner_professional, partner_business_minded, partner_solvent, partner_determined, partner_successful, gender2, height, body_type, hair_color, hair_length, eye_color, glasses_contacts, race, personality, hobbies_and_interests, goals_in_life, image_1, image_2, image_3, image_4, image_5, username, password, sdate) VALUES ('" . $first_name . "', '" . $last_name . "', '" . $gender . "', '" . $seeking . "', '" . $wanting . "', '" . $birthday . "', '" . $country . "', '" . $state_county . "', '" . $province_town . "', '" . $zip_postcode . "', '" . $phone_home . "', '" . $phone_home_show . "', '" . $phone_mob . "', '" . $phone_mob_show . "', '" . $email_address . "', '" . $introduction_title . "', '" . $religion . "', '" . $education . "', '" . $smoking . "', '" . $drinking . "', '" . $occupation . "', '" . $interests . "', '" . $marital_status . "', '" . $have_children . "', '" . $want_children . "', '" . $willing_relocate . "', '" . $languages . "', '" . $other_languages_spoken . "', '" . $star_sign . "', '" . $convenient_time . "', '" . $check_your_mail . "', '" . $possible_marriage . "', '" . $accept_divorced . "', '" . $partners_age . "', '" . $meeting_place . "', '" . $aim . "', '" . $yahoo . "', '" . $msn . "', '" . $icq . "', '" . $skype . "', '" . $hobbies_interests . "', '" . $sport . "', '" . $own_thing . "', '" . $quality_time . "', '" . $meeting_friends . "', '" . $family . "', '" . $sex . "','" . $clothes . "', '" . $disco_cinema . "', '" . $travelling . "', '" . $holidays . "', '" . $hobbies_interests_relations . "', '" . $caring_partner . "', '" . $sex_relations . "', '" . $harmony_trust . "', '" . $love_affection . "', '" . $understanding . "', '" . $thoughtfulness . "', '" . $own_space . "', '" . $romance . "', '" . $loyalty . "', '" . $support . "', '" . $charming . "', '" . $sense_of_humour . "', '" . $loyal . "', '" . $honest . "', '" . $attractive . "', '" . $optimistical . "', '" . $realistic . "', '" . $sexy . "', '" . $ambitious . "', '" . $visionary . "', '" . $quiet . "', '" . $conservative . "', '" . $tolerant . "', '" . $curious . "', '" . $selfconfident . "', '" . $athletic . "', '" . $attentive . "', '" . $shy . "', '" . $sociable . "', '" . $dominant . "', '" . $creative . "', '" . $active . "', '" . $passive . "', '" . $domesticated . "', '" . $friendly . "', '" . $sympathetic . "', '" . $fond_of_children . "', '" . $fond_of_animals . "', '" . $intelligent . "', '" . $romantic . "', '" . $talkative . "', '" . $joyful . "', '" . $humble . "', '" . $modest . "', '" . $caring . "', '" . $respectful . "', '" . $generous . "', '" . $thoughtful . "', '" . $down-to-earth . "', '" . $sensitive . "', '" . $professional . "', '" . $business_minded . "', '" . $solvent . "', '" . $determined . "', '" . $successful . "', '" . $partner_charming . "', '" . $partner_sense_of_humour . "', '" . $partner_loyal . "', '" . $partner_honest . "', '" . $partner_attractive . "', '" . $partner_optimistical . "', '" . $partner_realistic . "', '" . $partner_sexy . "', '" . $partner_ambitious . "', '" . $partner_visionary . "', '" . $partner_quiet . "', '" . $partner_conservative . "', '" . $partner_tolerant . "', '" . $partner_curious . "', '" . $partner_selfconfident . "', '" . $partner_athletic . "', '" . $partner_attentive . "', '" . $partner_shy . "', '" . $partner_sociable . "', '" . $partner_dominant . "', '" . $partner_creative . "', '" . $partner_active . "', '" . $partner_passive . "', '" . $partner_domesticated . "', '" . $partner_friendly . "', '" . $partner_sympathetic . "', '" . $partner_fond_of_children . "', '" . $partner_fond_of_animals . "', '" . $partner_intelligent . "', '" . $partner_romantic . "', '" . $partner_talkative . "', '" . $partner_joyful . "', '" . $partner_humble . "', '" . $partner_modest . "', '" . $partner_caring . "', '" . $partner_respectful . "', '" . $partner_generous . "', '" . $partner_thoughtful . "', '" . $partner_down-to-earth . "', '" . $partner_sensitive . "', '" . $partner_professional . "', '" . $seeking . "', '" . $seeking . "', '" . $seeking . "', '" . $seeking . "', '" . $seeking . "', '" . $partner_business_minded . "', '" . $partner_solvent . "', '" . $partner_determined . "', '" . $partner_successful . "', '" . $gender2 . "', '" . $height . "', '" . $body_type . "', '" . $hair_color . "', '" . $hair_length . "', '" . $eye_color . "', '" . $glasses_contacts . "', '" . $race . "', '" . $personality . "', '" . $hobbies_and_interests . "', '" . $goals_in_life . "', '" . $image_1 . "', '" . $image_2 . "', '" . $image_3 . "', '" . $image_4 . "', '" . $image_5 . "', '" . $username . "', MD5('" . $password . "'), '" . $sdate . "')") or trigger_error(mysql_error(),E_USER_ERROR); Code (markup): Fatal error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0', '', '', 'Man', 'Man', 'Man', 'Man', 'Man', '', '', '', '', '', '', '', '', '' at line 1 in register-process.php on line 26 Cheers, Adam
It's hard to say for me, but maybe wrong datatype. I suppose only gender,seeking,wanted can be "man" and you try to insert 5 "man" values. Maybe you should rewrite your query like INSERT INTO .. SET field1=value1, field2=value2, ... Code (markup): to find exact place whick mysql does not like.
You have mysql_real_escape_string on the user input posts, are there any more values that need that too?
After trying many different things it was because i used a - in down-to-earth field which was causing the problem. It should have been down_to_earth. DOH!!