View Single Post
Old 01-10-2003, 06:00 PM   #1 (permalink)
trevor
Code Monkey
 
Join Date: Jan 2003
Location: Canada
Posts: 91
trevor is on a distinguished road
yeah...i didn't fix it.....mySQL trouble (permissions?)

yeah......it made a lot of sense in computer class, but when I got home and tried it out,....well yeah, no luck.

still, I type in http://darkstar/index.php and >>NOTHING<< loads.

I was thinking, it should of at least outputed the invalid password error or something. Here is some code I am trying to get work - straight from the book "SAMS Teach yourself PHP4 in 24hours".

the code:

<html>
<head>
<title>testing mySQL connection</title>
</head>
<body>
<?php
$user = "root";
$pass = "123";
$db = "ao_db2003";
$link = mysql_connect("localhost", $user, $pass );
if ( ! $link )
die( "Couldn't connect to MySQL");
print "Successful connecting to server <p>";
mysql_select_db ( $db )
or die (could't connect to $db: ".mysql_error() );
print "Successfully connected to database \"$db"\<p>;
mysql_close ($link);
?>
</body>
</html>

WTF!!!! I tried it in a bunch of different browsers, and it is compliling fine because I cant see the source in "view source".

thanks A LOT for anyones help,

Trevor

:butt: - hehehe
trevor is offline   Reply With Quote