ballbearing
Technical User
I'm starting to get the hang of things, but SQL stuff is a bit frustrating. Anyway, I've been trying to get this to work but no luck. I've removed quotes, dots, $ signs and just about everything else. The statement is:
INSERT INTO users VALUES (2, '.$_SERVER['REMOTE_ADDR'].', 'admin', 'admin', '123 My Street', 'Belmont', 'North Carolina', '28012', 'United States of America', '.$siteemail.', '7048251111', NULL, '', '.$username.', '.md5($password).', 1, NOW(), '', '', '', NULL, NOW(), '', '', '');;
Error reports:
INSERT INTO users
VALUES ( 2, '.$_SERVER['REMOTE_ADDR '].', 'admin', 'admin', '123 My Street', 'Belmont', 'North Carolina', '28012', 'United States of America', '.$siteemail.', '7048251111', NULL , '', '.$username.', '.md5($password).', 1, NOW( ) , '', '', '', NULL , NOW( ) , '', '', '' )
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'REMOTE_ADDR'].', 'admin', 'admin', '123 My Street', 'Belmont', 'North Carolina',' at line 1
Can someone please get this thing into a statement that SQL actually will accept? Thanks loads to anyone.
INSERT INTO users VALUES (2, '.$_SERVER['REMOTE_ADDR'].', 'admin', 'admin', '123 My Street', 'Belmont', 'North Carolina', '28012', 'United States of America', '.$siteemail.', '7048251111', NULL, '', '.$username.', '.md5($password).', 1, NOW(), '', '', '', NULL, NOW(), '', '', '');;
Error reports:
INSERT INTO users
VALUES ( 2, '.$_SERVER['REMOTE_ADDR '].', 'admin', 'admin', '123 My Street', 'Belmont', 'North Carolina', '28012', 'United States of America', '.$siteemail.', '7048251111', NULL , '', '.$username.', '.md5($password).', 1, NOW( ) , '', '', '', NULL , NOW( ) , '', '', '' )
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'REMOTE_ADDR'].', 'admin', 'admin', '123 My Street', 'Belmont', 'North Carolina',' at line 1
Can someone please get this thing into a statement that SQL actually will accept? Thanks loads to anyone.