Could someone please tell me what is wrong with this code below?
I know it's something to do with either using '' or using "" or none at all, but I've triple checked my database and found that they are correct. I have int, text, varchar and an int. Therefore I should have no quotes, quotes, quotes, and no quotes on my values section.
$input = "insert into ownpage.favourites(uid,url,name,catid) values($_SESSION['uid'],'$url','$name',$cat)";
I get this error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\Webpages\addfavourite.php on line 37
The anoying thing is that I had already completed this script but deleted some of the code by mistake.