I'm attempting to set this command
$query="UPDATE accounts SET Name='$_POST['Name']' WHERE ID=1";
It returns
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/x/admin/editaccount.php on line 34
Line 34 is that line above.
I'm essentially trying to take a submitted HTML form and update the database. The $_POST part is causing an error. if i replace it with a variable, the issue goes away.
Is this possible to do? Or is there a better way to do it?