The application is only able to connect with a manually developed database in phpmyadmin but not able to create a database from the php.
here is the code (install_database.php) for creating that database
<?php
$cn = mysql_connect('localhost','root','') or
die('Unable to connect. Check connection parameters.');
$sql = 'CREATE DATABASE IF NOT EXISTS cars';
mysql_query($sql, $cn) or
die(mysql_error($cn));
mysql_select_db('cars') or
die(mysql_error($cn));
$sql = 'CREATE TABLE IF NOT EXISTS user (
user_id INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
user_username VARCHAR(80) NOT NULL,
user_password VARCHAR(80) NOT NULL,
user_join_date INTEGER UNSIGNED NOT NULL,
user_age INTEGER UNSIGNED NOT NULL,
user_country VARCHAR(100) NOT NULL,
PRIMARY KEY (user_id)
)
ENGINE=MyISAM';
mysql_query($sql,$cn) or
die(mysql_error($cn));
?>
its showing unknown database 'cars' on the browser. if any additional detail is required please inform.