<?php $con = new mysqli("host","username","password","database"); echo $con ? 'connected' : 'not connected'; ?>