run the query manually in mysql command prompt/phpmyadmin/mysql administrator to see expected results.
Ravi - no, that will not work. You have specified for mysql_fetch_array to return a numerically indexed array, but then go on to use associative index's..
mysql_fetch_assoc() will do fine, changing to *_array was unecessary.