making database with php : I'm trying to get my script needed information from user by php and make a database.
so I thought I could **make** a database and make a table in it by this code:

    <?php
	    //ini_set('display_errors', 'Off');
	    if(isset($_POST['siteName'])){
		    $DBS=htmlspecialchars($_POST['databaseServer']);
		    $DBN=htmlspecialchars($_POST['databaseName']);
		    $DBU=htmlspecialchars($_POST['databaseUser']);
		    $DBP=htmlspecialchars($_POST['databasePass']);
		    $SN=htmlspecialchars($_POST['siteName']);
		    $AU=htmlspecialchars($_POST['adminUser']);
		    $AP=htmlspecialchars($_POST['adminPass']);
		    $con=new Mysqli($DBS,$DBU,$DBP,$DBN);
		    if($con->connect_error)
			    echo "Error : ".$con->connect_error;
		    else{
			    $sql="CREAT DATABASE '$DBN'";
			    $sql.="CREATE TABLE options (sitename VARCHAR(30),adminUser VARCHAR(30),adminPass VARCHAR(30),reg_date TIMESTAMP);";
			$sql.="CREATE TABLE users (ID int(6) UNSIGNED AUTO_INCREMENT PRIMARY KEY, userName VARCHAR(30),password VARCHAR(30),reg_date TIMESTAMP);";
			$sql.="INSERT INTO '$DBN' (sitename,adminUser,adminPass) VALUES ($SN,$AU,$AP);";
			if($con->multi_query($sql)===true)
				echo " Enjoy .. ! ";
			else
				echo "Error : ".$sql." : ".$con->error;
				
			
		}
	}
	?>
but when I type a sample name for database,get this error:

    Error : Unknown database 'name'
and when creat a database manually and type the name of it in my form , get this error:

    Error : CREAT DATABASE 'ex'CREATE TABLE options (sitename
    VARCHAR(30),adminUser VARCHAR(30),adminPass VARCHAR(30),reg_date 
    TIMESTAMP);CREATE TABLE users (ID int(6) UNSIGNED AUTO_INCREMENT PRIMARY
    KEY, userName VARCHAR(30),password VARCHAR(30),reg_date     
    TIMESTAMP);INSERT 
    INTO 'ex' (sitename,adminUser,adminPass) VALUES (My Phone 
    Book,admin,102030); : You have an error in your SQL syntax; check the    
    manual that corresponds to your MySQL server version for the right
    syntax to use near 'CREAT DATABASE 'ex'CREATE TABLE options (sitename 
    VARCHAR(30),adminUser VARCHAR(' at line 1
So,whats wrong?