cassy01 Posted March 3, 2008 Share Posted March 3, 2008 hi, $query = "SELECT * FROM products WHERE itemType=\"handbags\" AND itemUsed=\"True\" AND itemSub=\"$_POST['itemSub']\" ORDER BY amount desc"; i am getting the error Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING please help Link to comment https://forums.phpfreaks.com/topic/94165-select-query-error-from-post/ Share on other sites More sharing options...
trq Posted March 3, 2008 Share Posted March 3, 2008 That is a php syntax error. We need to see more of your code, a few lines prior to the line given in the error should suffice. Link to comment https://forums.phpfreaks.com/topic/94165-select-query-error-from-post/#findComment-482329 Share on other sites More sharing options...
svivian Posted March 3, 2008 Share Posted March 3, 2008 I don't know if this is definitely your error but $_POST['itemSub'] should be {$_POST['itemSub']} Array elements in double-quoted strings don't normally display unless you put curly brackets round them. Link to comment https://forums.phpfreaks.com/topic/94165-select-query-error-from-post/#findComment-482330 Share on other sites More sharing options...
cassy01 Posted March 3, 2008 Author Share Posted March 3, 2008 it was the error thanks a lot. Link to comment https://forums.phpfreaks.com/topic/94165-select-query-error-from-post/#findComment-482331 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.