zamp0e Posted May 31, 2009 Share Posted May 31, 2009 Hello ! I've a problem with my insert line, which currently looks like this INSERT into iqsmart VALEUS ('NULL', $_POST['name'], '$points'); The browser returns Parse error: parse error in C:\xampp\htdocs\test2\index.php on line *** Im sure it is a silly syntax error or something like that, but could someone take a look and tell me whats wrong ? Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/160396-solved-help-with-insert/ Share on other sites More sharing options...
xx_princess_xx Posted May 31, 2009 Share Posted May 31, 2009 INSERT into iqsmart VALUES ('NULL', $_POST['name'], '$points'); you spelt values wrong easy mistake dont wory Link to comment https://forums.phpfreaks.com/topic/160396-solved-help-with-insert/#findComment-846415 Share on other sites More sharing options...
zamp0e Posted May 31, 2009 Author Share Posted May 31, 2009 Thanks, fixed it. Im still having the same error though :-\ Link to comment https://forums.phpfreaks.com/topic/160396-solved-help-with-insert/#findComment-846418 Share on other sites More sharing options...
Ken2k7 Posted May 31, 2009 Share Posted May 31, 2009 INSERT INTO iqsmart VALUES ('NULL', '{$_POST['name']}', '$points'); Link to comment https://forums.phpfreaks.com/topic/160396-solved-help-with-insert/#findComment-846419 Share on other sites More sharing options...
DarkSuperHero Posted May 31, 2009 Share Posted May 31, 2009 $query = "INSERT INTO iqsmart VALUES ('NULL', '".$_POST['name']."', '".$points."');"; Link to comment https://forums.phpfreaks.com/topic/160396-solved-help-with-insert/#findComment-846421 Share on other sites More sharing options...
zamp0e Posted May 31, 2009 Author Share Posted May 31, 2009 Thanks for all your help, I've tried all of your suggestions, all of them replys the same error :-\ Link to comment https://forums.phpfreaks.com/topic/160396-solved-help-with-insert/#findComment-846423 Share on other sites More sharing options...
gizmola Posted May 31, 2009 Share Posted May 31, 2009 Ok, I'll play. Let's try this: $sql = "INSERT into iqsmart VALUES (NULL, {$_POST['name']}, '$points')"; Link to comment https://forums.phpfreaks.com/topic/160396-solved-help-with-insert/#findComment-846426 Share on other sites More sharing options...
zamp0e Posted May 31, 2009 Author Share Posted May 31, 2009 And we have a winner! Thanks alot! Link to comment https://forums.phpfreaks.com/topic/160396-solved-help-with-insert/#findComment-846428 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.