<?php $link = mysql_connect('localhost', 'user', 'pass') or die('ERROR CONNECT'); mysql_select_db('base_name', $link) or die('DB NOT FOUND'); ?>