PHP Parse Error - T_STRING
Posted: Sun Aug 06, 2006 1:38 pm
When I try and connect to a database using php, I get this error:
Can anyone tell me how to get around this error?
This is the connection code I am using:PHP Parse error: parse error, unexpected T_STRING in D:\Documents and Settings\Administrator.THAKES_SERVER\Desktop\Intranet\Development\Website\index.php on line 168
Code: Select all
$link = mysql_connect( "localhost", "root", "password" );
if ( ! $link ) {
die( "Couldn't connect to MySQL" );
}
$database = "website"
mysql_select_db( $database ) or die ( "Couldn't open $database" );
$table = "hits"
mysql_select_table( $table ) or die ( "COuldn't open $table" );