Page 1 of 1

query string syntax problems...

Posted: Thu Oct 19, 2006 8:32 am
by stv
hi folks, I'm a beginner in php so please be patient. my question is why this query doesn't work?

Code: Select all

$query = "SELECT * FROM `songs` LIMIT '" . $_REQUEST['fromID'] . "','" . $_REQUEST['toID'] . "'";
thanks for help

Posted: Thu Oct 19, 2006 8:46 am
by feyd
echo $query please.

Posted: Thu Oct 19, 2006 10:44 am
by RobertGonzalez
Can I also make a small suggestion? Do not use the $_REQUEST superglobal if you know the values are coming from GET or POST. Use GET or POST. Also, don't hit the query directly with the passed information. Validate first. Just a suggestion. Post what the query is actually seeing so we can go from their.