i am having a problem with the following code:
$sql="insert into table (title,name) values ('$_POST['title']','$_POST['name']')";
when i run it throws an exception:
Parse error: parse error, expecting T_STRING' orT_VARIABLE' or `T_NUM_STRING' in /var/www/html/myscript/myscript.php on line 14
if remove the single quotes from around the array keys i.e. '$POST[title]' instead of '$POST['title']' it works fine.
i thought i was supposed to make sure that all of my literal array keys were supposed to quoted, do i need to escape the quotes somehow?