RE: [PHP] No signal of success

From: Date: Fri, 28 Jul 2000 18:32:58 +0000
Subject: RE: [PHP] No signal of success
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-8833@lists.php.net to get a copy of this message
Before executing your insert statement, try echoing the string out that you are going to pass to your database. This way you can see exactly what string will be passed to it. If you still cannot see the error that way, copy and paste the echoed line into the command line in your database interaction tool. This will tell you exactly what error is being returned from the database and thus explaining why the insert is failing. HTH! Sam Masiello System Analyst Chek.Com (716) 853-1362 x289 smasiello@chekinc.com -----Original Message----- From: Juan M. Fach [mailto:fach@sosua.ilanguage.com] Sent: Friday, July 28, 2000 1:25 PM To: php-general@lists.php.net Subject: [PHP] No signal of success HELP please! I got the following script, and I don't see any signal that the data have been entered into the database..! Who can help me to correct it <!---Adduser php script begins here---> <? /* this script will handle the variables passed from the addnew.htm file */ /* declare some relevant variables */ $hostname = "xxx"; $username ="xxx"; $password = "xxxx"; $dbName = "recds"; /* MySQL table created to store the data */ $userstable = "newpeople"; /* the site administrator's email address */ $adminaddress = "me@midominio.com"; if ($db=mysql_connect($hostname,$username,$password)) { if (mysql_select_db ($dbName,$db)) { $myquery="INSERT INTO $userstable VALUES ('$first_name,'$last_name','$country','$mother_tongue','$languages','$lanpai rs','$gender','$birthday','$occupation','$dbskills','$progskills','$ik_level ','$mngskills','$itskills','$educ_degree1','$edu_desc1','$educ_degree2','$ed u_desc2','$educ_degree3','$edu_desc3','$work_resume','$ref1_name','$ref1_ema il','$ref1_phone','$ref2_name','$ref2_email','$ref2_phone','$ref3_name','$re f3_email','$ref3_phone','$comments')"; if ($result = mysql_query ($myquery)) PRINT "Your information has also been inserted into our database, for future reference."; } else echo mysql_error(); } else echo mysql_error(); ?> <!---Adduser php script ends here---> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#8833) next »