CGI/DBI , PHP/MySQL

Connecting to database

e.g. Database Name : test

Database Username : tester

Database password : 123456

Perl

 

$dbh = DBI->connect("DBI:mysql:test:localhost","tester","123456");

 

PHP

 

$dbh=mysql_connect ("localhost", "tester", "123456") or die ('Failed to connect to the database.');

mysql_select_db ("test");