The below code gives me this error:
Wrong parameter count for mysql_select_db()
Here is the code:
<HEAD>
<TITLE>Creating a Table</TITLE>
</HEAD>
<BODY>
<?php
$Host = "localhost";
$User = "administrator";
$Password = "";
$DBName = "NewDatabase";
$TableName = "Feedback";
$Link = mysql_connect ($Host, $User, $Password);
$Query = "CREATE table $TableName (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
FirstName TEXT, LastName TEXT, EmailAddress TEXT, Comments TEXT)";
if (mysql_query ($DBName, $Query, $Link)) {
echo ("The query was successfully executed!<BR>\n");
} else {
echo ("The query could not be executed!<BR>\n");
}
mysql_close ($Link);
?>
</BODY>
Where should the mysql_select_db function be placed and what parameters does it require? I have failed to find any examples to specify this.
Thanks guys.
Wrong parameter count for mysql_select_db()
Here is the code:
<HEAD>
<TITLE>Creating a Table</TITLE>
</HEAD>
<BODY>
<?php
$Host = "localhost";
$User = "administrator";
$Password = "";
$DBName = "NewDatabase";
$TableName = "Feedback";
$Link = mysql_connect ($Host, $User, $Password);
$Query = "CREATE table $TableName (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
FirstName TEXT, LastName TEXT, EmailAddress TEXT, Comments TEXT)";
if (mysql_query ($DBName, $Query, $Link)) {
echo ("The query was successfully executed!<BR>\n");
} else {
echo ("The query could not be executed!<BR>\n");
}
mysql_close ($Link);
?>
</BODY>
Where should the mysql_select_db function be placed and what parameters does it require? I have failed to find any examples to specify this.
Thanks guys.