Jump to content

not adding data to mysql via insert...


joecooper

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/85828-not-adding-data-to-mysql-via-insert/
Share on other sites

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());

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.