<?php
$login=mysql_connect("localhost","wauhaha_smart",'asd123');
mysql_select_db("wauhaha_smart");
$totaluser=0;
$totalrating=0;
$q=mysql_query("SELECT * FROM userreview where productID='".$_REQUEST['product']."' ORDER BY dateSubmit DESC ");
    while($display=mysql_fetch_assoc($q)){
	
		$output[]=$display;
	}
	
     

print(json_encode($output));

mysql_close();
?>