table is the name of the table in the database. $database in your example will contain a result set of rows from the database according to the query passed into the mysql_query function. It should probably be named $result instead of $database to give you a clearer understanding of what is happening.
Try to think of a database being like a filing cabinet. The tables in the database are the files in the filing cabinet and store the actual data.
EDIT: To actually connect to the database in php, check out the mysql_connect function. Once connected you run SQL queries using the mysql_query function and interrogate the result with the mysql_fetch_* functions.
Last edited by darkagn; Mar 31st, 2009 at 1:04 am.
Reputation Points: 395
Solved Threads: 192
Veteran Poster
Offline 1,136 posts
since Aug 2007