Jump to content

php help session


ananaz

Recommended Posts

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']."')";

Link to comment
https://forums.phpfreaks.com/topic/223523-php-help-session/#findComment-1155396
Share on other sites

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.