joecooper Posted January 13, 2008 Share Posted January 13, 2008 this is my query mysql_query("INSERT INTO `users` ( `id` , `email` , `name` , `password` , `address1` , `address2` , `town` , `city` , `postcode` , `phone` , `accept` ) VALUES ('', '$email', '$name', '$password', '$address1' , '$address2' , '$town' , '$city' , '$pcode' , '$phone' , '$accept');"); it doesnt actually return any errors, it acts like its done it, but doesnt do anything. it connects to the DB fine Quote Link to comment https://forums.phpfreaks.com/topic/85828-not-adding-data-to-mysql-via-insert/ Share on other sites More sharing options...
Hypnos Posted January 13, 2008 Share Posted January 13, 2008 Try echoing mysql_error() after the query. echo mysql_error(); Quote Link to comment https://forums.phpfreaks.com/topic/85828-not-adding-data-to-mysql-via-insert/#findComment-438014 Share on other sites More sharing options...
nezbo Posted January 13, 2008 Share Posted January 13, 2008 it might be some thing to do with the ; at the end '$accept')[color=red];[/color]"); it is also worth puting the code or dir(mysql_error()) at the end of any mysql. mysql_query("INSERT INTO `users` ( `id` , `email` , `name` , `password` , `address1` , `address2` , `town` , `city` , `postcode` , `phone` , `accept` ) VALUES ('', '$email', '$name', '$password', '$address1' , '$address2' , '$town' , '$city' , '$pcode' , '$phone' , '$accept')") or die(mysql_error()); Quote Link to comment https://forums.phpfreaks.com/topic/85828-not-adding-data-to-mysql-via-insert/#findComment-438017 Share on other sites More sharing options...
joecooper Posted January 13, 2008 Author Share Posted January 13, 2008 ahh, in my database, the feild was called agree, instead of accept. thats twice now ive been gotton by that! i changed and its working thanks Quote Link to comment https://forums.phpfreaks.com/topic/85828-not-adding-data-to-mysql-via-insert/#findComment-438019 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.