$u=$_POST['userid'];
$sql=mysqli_query($con,"SELECT COUNT(username) AS total FROM TABLENAME where username=$u");
This query only retun the total records for username=$u
I want all users records to be displayed in total
I want something likes
User Records
User1 1152
user2 2365
user3 2365
------ -------
userN XXX
I am using php and mysql.
Also please tell. What shall I echo, $sql
or Total
?
Thanks for your help
I tried this : and receiving error on line :
while($fetch = mysql_fetch_assoc($sql))
This is code that you guys gave me
'; print_r($array); mysqli_close($con); ?>Thanks again