i have written a php script that was going to be used for user authentication. it won't work locally, but it will work on the webserver i have access to. i think it's never connecting to my database locally. here is the code:
<?php
$user = "root";
$password = "sheridan.";
$database = "test";
mysql_connect(localhost, $user, $password);
//@mysql_create_db($database) or die ("could not create database");
@mysql_select_db($database) or die ("Error: ID10T");
$query = "CREATE TABLE users (
id int(11) auto_increment,
username varchar(20),
password varchar(20),
email varchar(30),
fname varchar(20),
lname varchar(20),
PRIMARY KEY(id),
UNIQUE(id),
KEY id_2(id)
)";
mysql_query($query);
mysql_close();
?>
any suggestions? something on my computer locally is possibly preventing the connection? or perhaps it has to do with my configuration of the database or something of that nature?