<?php $conn=mysqli_connect("localhost","username","password","database_name"); ?> This code will connect with database 'database_name' while $conn is connection name