i am trying to update mysql table with php grabbing data from a form.
When i run the script with this
$query="UPDATE customers SET background='$_GET['background']',font='$_GET['font']',fontcolour='$_GET['fontcolour']',fontsize='$_GET['fontsize']',title='$_GET['title']' WHERE client='$_GET['client']'";
i get a black screen but if i do the below script
$background=$_GET['background'];
$client=$_GET['client'];
$query="UPDATE customers SET background='$background' WHERE client='$client'";
it goes through fine
although i can do it this way i am trying to understand why i can not just put the get right into the query rather than having more lines of code than necessary.
NOTE: all other code stripped can post if required.