ananaz Posted January 5, 2011 Share Posted January 5, 2011 what is the problem here? $sql="INSERT INTO comment (linkid, text, anvid) VALUES ('$_POST[link]','$_POST[comment]','$_SESSION['user'];')"; Quote Link to comment Share on other sites More sharing options...
Zurev Posted January 5, 2011 Share Posted January 5, 2011 what is the problem here? $sql="INSERT INTO comment (linkid, text, anvid) VALUES ('$_POST[link]','$_POST[comment]','$_SESSION['user'];')"; Mainly because your quotes are a bit off (actually your semi-colon is before the ending quote), I would personally do it like so: $sql = "INSERT INTO `comment` (`linkid`, `text`, `anvid`) VALUES ('".$_POST['link']."', '".$_POST['comment']."', '".$_SESSION['user']."')"; Quote Link to comment Share on other sites More sharing options...
Maq Posted January 5, 2011 Share Posted January 5, 2011 Next time you get an error, please post it. Quote Link to comment 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.