scusate, ho questo semplice file... dov'è l'errore? non capisco...
codice:
<html>
<head>
<title> Install </title>
</head>
<body>
<?php
include("config.php");
$db_data = mysql_connect($db_host, $db_user, $db_password);
if ($db_data == FALSE)
die ("Errore nella connessione. Verificare i parametri nel file config.php");
mysql_select_db($db_name, $db_data)
or die ("Errore nella selezione del database. Verificare i parametri nel file config.php");
$query = "CREATE TABLE commenti (id INT (5) UNSIGNED not null AUTO_INCREMENT,
comment TEXT not null , name VARCHAR (50), data INT (11), PRIMARY KEY (id))";
if (mysql_query($query, $db_data))
{
print "<html>\n";
print "<head>\n";
print "<title>Pagina di installazione</title>\n";
print "</head>\n";
print "<body>\n";
echo "L'installazione è stata eseguita correttamente \n";
print "</body>\n";
print "</html>\n";
}
else
{
print "<html>\n";
print "<head>\n";
print "<title>Pagina di installazione</title>\n";
print "</head>\n";
print "<body>\n";
echo "Errore durante l'installazione \n";
print "</body>\n";
print "</html>\n";
}
mysql_close($db_data);
?>
</body>
</html>
Mi va sempre nell'else, stampandomi "Errore durante l'installazione"