HTML is how you view data, MySQL is how you store data, PHP is how you control the process of getting data from MySQL to HTML. Since PHP is a scripting language and SQL is not, PHP can analyze the data returned from the SQL and makes decisions off of it.