torrentmasta Posted March 14, 2007 Share Posted March 14, 2007 hi, im a noob to all this and im trying make a counter on my webpage that shows registered users. $result = mysql_query("SELECT COUNT(user) from mytable"); echo "$result"; How do i get to output the proper result counter in the echo statment, i apologize for such noobiness. I tried to use fetch function to get the data but in not sure how to do it right. Torrentmasta Link to comment https://forums.phpfreaks.com/topic/42603-solved-displaying-count-result-on-webpage/ Share on other sites More sharing options...
torrentmasta Posted March 14, 2007 Author Share Posted March 14, 2007 I went deeper into your forums and found the answers i was looking for $count = mysql_query("SELECT count(user) FROM websitedata", $con); echo "Total Registered Members: ". mysql_result($count, 0, 0); dang, that was an easy fix, im such a noob, lol Well thx to your great forums i found the answers HAIL PHPFREAKS!!! Torrentmasta Link to comment https://forums.phpfreaks.com/topic/42603-solved-displaying-count-result-on-webpage/#findComment-206767 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.