<?php $error = null; $database_found=true; // Check whether the database exists via the database name. // Check for the settings. if(!$MySQL['db'] || !$MySQL['server'] || !$MySQL['user']){ $error = 'Your settings do not have all the database information required!'; }else{ // Connect to the database. if (!$link) { } } // Check for errors and only continue if there aren't any. if($error){ } // Check that the database doesn't exist already. if($database_found){ $error = 'The database specified in your settings is already installed!'; } if($error){ } // Create the database. $sql = 'CREATE DATABASE '.$MySQL['db']; if(!$database_created){ } if($error){ }
plik settings.php
$MySQL['server']='localhost'; //Server $MySQL['user']='user'; //Username $MySQL['pass']='hasło'; //Pasword $MySQL['db']='nazwa_bazy'; //Database that will be created by the install script and used
gdzie Tu jest jakis bład?