I am just getting started with PHP and MySQL. I can't connect to MySQL?

  • Thread starter Thread starter sin f
  • Start date Start date
S

sin f

Guest
I think I enter the wrong parameters in the expression:
$db = mysql_connect('localhost', 'Root', 'Password').
I'm pretty sure that I use the right password. But I am not sure if I am using the right value instead of "root". Can someone help me please?
Thanks in advanced.
 
You just forget something.
<?php

$db = mysql_connect('localhost', 'Root', 'Password') or die('Unable to connect');

mysql_select_db('Database name', $db ) or die('Unable to select';

?>

Now i think every think will working with you .

ooooh thank you very much .. kiss ... wow your welcome.
 
Back
Top