$con = mysqli_connect('localhost','root','');
$database = $request->database_name;
$query = "CREATE DATABASE $database";
$return = mysqli_query($con,$query);
if($return)
{
echo "Database created successfully.";
}
More Related Contents:
- Order results from two queries based on time in second query [closed]
- Save the data into a database and return another value from database using PHP
- Problame with files on SQL
- Im trying to create some temporary tables in mysql using php
- How can I prevent SQL injection in PHP?
- SQL injection that gets around mysql_real_escape_string()
- How to include a PHP variable inside a MySQL statement
- How to apply bindValue method in LIMIT clause?
- SELECT COUNT(*) AS count – How to use this count
- Achieve hierarchy, Parent/Child Relationship in an effective and easy way
- selecting unique values from a column
- How to search for slash (\) in MySQL? and why escaping (\) not required for where (=) but for Like is required?
- I cannot get my login form to connect interact properly with mySQL database [closed]
- mysql_num_rows(): supplied argument is not a valid MySQL result resource [duplicate]
- Increment value in MySQL update query
- Create a dynamic mysql query using php variables
- How to separate DATE and TIME from DATETIME in MySQL?
- Do SQL connections opened with PDO in PHP have to be closed
- MYSQL Select from tables based on multiple rows
- How to execute raw queries with Laravel 5.1?
- How to convert ISO8601 to Date format in php
- MySQL skipping first row
- How do you do multiple SQL statements in one mysql_query?
- MySQL/SQL retrieve first 40 characters of a text field?
- Fatal error: Call to a member function query() on null
- How would I implement a simple site search with php and mySQL?
- how do I get month from date in mysql
- php/mysql zip code proximity search
- Updating column so that it contains the row position
- Aggregated query without GROUP BY