Ok first, my goal is to create a website reviewing music. i want to allow users to rate songs and albums on a number scale. i installed XAMPP and have created a database with phpMyAdmin and threw a few entries in. i'm just testing things out and trying to learn this stuff as i go along so please be patient, i have no idea what i'm doing. i used the following code to establish a connection with the database and from what i see, it works because i got the "Successfully selected database "ratings" " message.
Code: Select all
<?php
$db = "ratings";
$link = mysql_connect( "localhost");
if ( ! $link )
die( "Couldn't connect to MySQL" );
print "Successfully connected to server<P>";
mysql_select_db( $db )
or die ( "Couldn't open $db: ".mysql_error() );
print "Successfully selected database \"$db\"<P>";
mysql_close( $link );
?>