ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button
  Using MySQL from PHP
Subject:   mysql php database connectivity problm
Date:   2009-03-02 07:30:17
From:   krishkrish
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.