SI SI CHE FUNGE ovviamente gli devi mettere dentro il file di connessione al tuo db
config.php
Codice PHP:<?
$server = "localhost"; // often localhost
$username = "root"; // Your MySQL server username
$password = "password";// Your MySQL server
?>
e poi nel file dove crei il db ci scrivi :
e ti assicuro che funziona !!Codice PHP:include "config.php";
$db = mysql_connect("$server", "$username", "$password");
$query = mysql_query("CREATE DATABASE `prova`");

Rispondi quotando