Re: Re: [PHP] OK Dan...

From: Date: Wed, 06 Mar 2002 04:05:42 +0000
Subject: Re: Re: [PHP] OK Dan...
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-87416@lists.php.net to get a copy of this message
Dan, I;m using PHP to create my database. This is the script I'm using: ---------------------- <?php // This is your host name address to MySQL (usually 'localhost') $db_location = "209.193.72.9"; // This is the username to the MySQL server. $db_uid = "gdesigns"; // This is the password to the MySQL server. $db_pw = "password"; //////////////////////////////////////////////////////////////////////////// ///// // Nothing else needs to be edited below this. // //////////////////////////////////////////////////////////////////////////// ///// // Database name (specified in the web form). $database_name = "$db_name"; // Try to make a MySQL connection. $connection = @mysql_connect("$host_to_mysql", "$un_to_mysql", "$pw_to_mysql") or die("Couldn't connect to MySQL."); // Add the new database to the MySQL server. $result = @mysql_create_db($db_name, $connection) or die("Couldn't create the database."); // If the database was created, print a statement that says so. if ($result) { echo "Database created successfully!"; } ?> ---------------------- Thanks, -GENESiS DESiGNS -Sean Kennedy -http://www.gdesigns.vcn.com

« previous php.general (#87416) next »