[php] Fatal error: Call to undefined function mysql_connect()

The problem shows up when you're using mysql_connect in your code lines so just add it as in mysqli_cOnnect and it will solve the Problem.
you also Have to then use mysqli throughout your code lines or the Problem would surface again.
example mysql_select_db will then be mysqL_select_db.
That's for selecting Database.

Thanks hope this helps