please pardon the newbie. i can't connect to my database via php. i'm running a simple test script to see if i can connect.
<?
$link_id = mysql_connect("localhost", "un", "pw");
if (mysql_select_db("mysql", $link_id)) echo "connected to the localhost.";
else die ("connection failed.");
?>
my user name and password are correct and i can connect via telnet but not via php. i don't get a "die" message. when i access the page, it simply freezes and asks if i want to download the page or open it. i have it posted as <!-- m --><a class="postlink" href="http://www.carvinoutourname.com/dbtest1.php">http://www.carvinoutourname.com/dbtest1.php</a><!-- m -->
one last question. is the host name always "local host"?
thanks peter
<?
$link_id = mysql_connect("localhost", "un", "pw");
if (mysql_select_db("mysql", $link_id)) echo "connected to the localhost.";
else die ("connection failed.");
?>
my user name and password are correct and i can connect via telnet but not via php. i don't get a "die" message. when i access the page, it simply freezes and asks if i want to download the page or open it. i have it posted as <!-- m --><a class="postlink" href="http://www.carvinoutourname.com/dbtest1.php">http://www.carvinoutourname.com/dbtest1.php</a><!-- m -->
one last question. is the host name always "local host"?
thanks peter