Looking for somewhere to host your site? Browse our PHP web hosts section!

Home > Code Snippets > Connect to a MySQL database

Connect to a MySQL database


A simple little function allowing you to connect to a MySQL database.

The code

There was a problem whilst attempting to load the source code.

Get the code

Download the file to your computer: Click here to get the file