Here it the snippet, you can copy - paste into your code.
<?php $my['host'] = "localhost"; $my['user'] = "root"; $my['pass'] = "password"; $my['dbs'] = "database_name"; $connect = mysql_connect($my['host'], $my['user'], $my['pass']); if (! $connect) { echo "Connection Fail..!"; mysql_error(); } // CHOOSE THE DATABASE mysql_select_db($my['dbs']) or die ("Can't find the database ".mysql_error()); ?>
Tidak ada komentar:
Posting Komentar