0

Im getting a "Unknown database 'user_admin'" error and i dont see it

here is my code

$username = mysql_real_escape_string($_POST["Username"]);

$query = "SELECT * FROM user WHERE UserName='$username'";
$result = mysql_query($query);

if(mysql_affected_rows() == 0)
{   
    //All Checks Out: Create Databases
    $dbase = "user_" . $_POST["Username"];

    mysql_query("CREATE DATABASE $dbase",$con) or die(mysql_error());

    mysql_select_db($dbase, $con) or die(mysql_error());

    $sql = "CREATE TABLE profile
    (
    intro varchar(180), 
    WhoAMI TEXT, 
    gender int,
    Location varchar(50),
    edited TIMESTAMP DEFAULT NOW()
    )";
2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by nunomartinsinet
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.