Friends ,
I try below program and it gives error as
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'localhost' (10061) in C:\WINDOWS\TEMP\~scp.php on line 9
Warning: mysql_select_db() [function.mysql-select-db]: Can't connect to MySQL server on 'localhost' (10061) in C:\WINDOWS\TEMP\~scp.php on line 12
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in C:\WINDOWS\TEMP\~scp.php on line 12
Could not select database
M<in Program
<?
$host = "localhost";
$login_name = "user";
$password = "pass";
MySQL_connect("$host","$login_name","$password");
MySQL_select_db("first_database") or die("Could not select database");
$sql = "CREATE TABLE addressbook (
ID INT(3) NOT NULL PRIMARY KEY AUTO_INCREMENT,
Email CHAR(50) NOT NULL,
First_Name CHAR(25) )
";
$result = mysql_query($sql);
if ($result) {
echo("Table created successfully");
} else {
echo("error when creating table");
}
MySQL_close()
?>