RON_ron Posted December 1, 2010 Share Posted December 1, 2010 I'm unable to update the table. Could someone tell me why? $dfield1 = mysql_real_escape_string($field1); $dfield2 = mysql_real_escape_string($field2); $dfield3 = mysql_real_escape_string($field3); $dfield4 = mysql_real_escape_string($field4); $result =sprintf("SELECT * FROM db1 WHERE username ='%s'", $dfield1); $resultf = mysql_query($result); if (mysql_num_rows ($resultf) > 0){ $register = "&err=Not Available. Retry."; echo($register); } else { mysql_query("INSERT INTO db1 (name, birthday, street, phone) VALUES ('$dfield1', '$dfield2', '$dfield3', '$dfield4')"); $register = "Successful."; echo($register); } Quote Link to comment https://forums.phpfreaks.com/topic/220337-coding-help/ Share on other sites More sharing options...
trq Posted December 1, 2010 Share Posted December 1, 2010 You seriously need to learn some debugging and manual reading skills. Your posting lots of questions and learning nothing from the answers. On top of that you really should learn some communication skills. You have not provided anywhere near enough information for anyone to be able to assist you. You are seriously verging on trolling. Quote Link to comment https://forums.phpfreaks.com/topic/220337-coding-help/#findComment-1141759 Share on other sites More sharing options...
RON_ron Posted December 1, 2010 Author Share Posted December 1, 2010 You seriously need to learn some debugging and manual reading skills Accepted. and learning nothing from the answers. What are you referring to? You have not provided anywhere near enough information My question was "I'm unable to update the table. Could someone tell me why?" Basically when i use this code it doesn't update the mysql db. in addition. Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_VARIABLE or '$' in /home/.../test.php on line 5 Quote Link to comment https://forums.phpfreaks.com/topic/220337-coding-help/#findComment-1141766 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.