Article:
  Using MySQL from PHP
Subject:   mysql php database connectivity problm
Date:   2009-03-02 07:30:17
From:   krishkrish
<?php
$servername='localhost';
$dbusername='root';
$dbpassword='sivagami';
connecttodb($servername,$dbname,$dbusername,$dbpassword);
function connecttodb($servername,$dbname,$dbuser,$dbpassword)
{
global $link;
$link=mysql_connect ("$servername","$dbuser","$dbpassword");
if(!$link){die("Could not connect to MySQL");}
echo 'Connected Successfully';
$database = 'tms';
mysql_select_db($database [,, $link]);


}
?>



is this correct or not. it display the message connected successfully. but if i insert it doesn't work. what to do. any body help me.