Counting Number Of Entries In A Database

Do you have your own database?  How would you like to know how many entries you have in your database from a PHP page?  Well its easy, I am going to show you a script that will allow you to create a counter that will count the number of entries you have in your database.

Now lets say we have an email database, and we want to count the number of emails we have in the database.  All we need to do is create this simple script (assuming your database is already made).

We are going to go ahead and assume you are root user, if not use your username and password.  (If you have one in MySql)

Connecting to the database