Re: FORM not inserting data

From: Date: Fri, 26 Apr 2002 16:36:11 +0000
Subject: Re: FORM not inserting data
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-18833@lists.php.net to get a copy of this message
put in a "var_dump($sql);die();" right after $result = mysql_query($sql); Then copy/paste it into mysql's command line util, and see what you get. -Szii ----- Original Message ----- From: "Neil" <aveloop@neilmar.com> To: <php-db@lists.php.net> Sent: Thursday, April 25, 2002 6:34 PM Subject: [PHP-DB] FORM not inserting data Help. Help Please, Please tell me what I am doing wrong here...I have a form to input data but it is not posting it....here is the code. It seems to work no errors but a query show no new additions to the table. $sql = "INSERT INTO employees (first,last,address,date_of_birth,sex,age,telephone, parent_guardian_name,parent_guardian_workplace,work_telephone,emergency_information_contact, list_physical_conditions_if_any,all_schools_previously_attended,examinations_passed,older_brothers,younger_brothers,older_sisters,yo unger_sisters, names_sisters_or_brothers_attending_school) VALUES ('$first','$last','$address','$date_of_birth',$sex','$age','$telephone','$parent_guardian_name','$parent_guardian_workplace', '$work_telephone','$emergency_information_contact','$list_physical_conditions_if_any','$all_schools_previously_attended','$examinati ons_passed','$older_brothers','$younger_brothers','$older_sisters','$younger_sisters','$names_sisters_or_brothers_attending_school') "; $result = mysql_query($sql); echo "Thank you! Information entered.\n"; } else{ // display form ?> Neil

« previous php.db (#18833) next »