PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
was wondering how to go about echoing to a htm doc, the total amount of entries in an SQL table.... Im looking to display the total amount of members the site has, something like:
Blah.com's Registered Members (100) <-- echoed 'id' row in members table
<?php
$sql = mysql_query("SELECT * FROM table_name");
$membercount = mysql_num_rows($sql);
echo "There are $membercount users";
// All you need to modify is table_name with the actual name of the table
?>