The four statement for connecting to the mysql database using php are
- mysql_connect() to connect to the server
- mysql_select_db() selects the specific data base to connect to
- mysql_query() sends and sql statement to the server
- mysql_fetch_array() returns the data from the server
One can also use mysqli commands which allows one to one more then one database at a time. The mysqli are the improved mysql functions. They have more capability then the start mysql functions such as with mysqli you can open more then one database at a time where with mysql you can open only one database at a time.