A: 

Do you pass though category in the request? You haven't given us that information (what is the value of qstr in the javascript?), but I'd guess not.

You're also passing it straight into an SQL query, which leaves you open to injection.
You should use mysql_escape_string() to fix that.

Greg
I hv do this with mysql_escape_string(), but not working. 2nd pages goes blank.I hv unable to pass query string as a category in the javascript,Because i m poor in js programing.
A: 
  • Post it with the AJAX call and return it
  • Store it in a local JS variable
  • Add it to the URL
  • ...
Niels R.
A: 

You seem to be aware that $_GET['p'] gets the value of the 'p' parameter passed in the querystring. Well $_REQUEST['category'] is doing the same thing. (Technically $_REQUEST checked everything in $_POST, $_GET and $_COOKIE).

So if you haven't set the 'category' in the querystring then it wont contain anything in your code.

samjudson
A: 
  1. You should add ?category=XXX&sid=RAND... to your url
  2. Better use $category = isset($_GET['category']) ? (int)$_GET['category'] : 0;
Jet
I hv do with yr code ,but no any changes found.I hv updated full code.Plz see again my code.And send the response to me.