th2mods
11-16-2007, 12:04 AM
it wont connect to my database, i dont get this. dont i need to pass word and db name not jsut the local host and "root"?
<?php
$db_link = mysql_connect("localhost", "root", "");
if (!$db_link) {
die("Could not connect: " . mysql_error());
}
mysql_select_db("carousel") or die("Could not select database");?>
EDIT i get this error
Could not connect: Access denied for user '/hosted/subs/ulm'@'64.72.116.195' (using password: YES)
with this code
<?php
$db_link = mysql_connect("mysql", "/hosted/subs/ulmb.com/y/y/yyz/public_html", "MY PASSWORD");
if (!$db_link) {
die("Could not connect: " . mysql_error());
}
mysql_select_db("carousel") or die("Could not select database");?>
<?php
$db_link = mysql_connect("localhost", "root", "");
if (!$db_link) {
die("Could not connect: " . mysql_error());
}
mysql_select_db("carousel") or die("Could not select database");?>
EDIT i get this error
Could not connect: Access denied for user '/hosted/subs/ulm'@'64.72.116.195' (using password: YES)
with this code
<?php
$db_link = mysql_connect("mysql", "/hosted/subs/ulmb.com/y/y/yyz/public_html", "MY PASSWORD");
if (!$db_link) {
die("Could not connect: " . mysql_error());
}
mysql_select_db("carousel") or die("Could not select database");?>