I have the following php script which connects successfully to mysql....and create table.

$link = mysql_connect('localhost', '1345', '12345');
if (!$link) {
die('Could not connect: ' . mysql_error());}
$sql = 'CREATE DATABASE shop';
if (mysql_query($sql, $link)) {
echo "Database shop created successfully\n";
} else {
echo 'Error creating database: ' . mysql_error() . "\n";

What scripts can i add to this, instead of automatically creating a database pre-defined early but give user to input the database name and also drop it.
My point is to avoid the user from doing any editing or modification to the script. Just click and get!

For instance: once connected it says: input and feedback

> Please enter your database name: .................User input here.
> Your database (any name) is created successfully !

> drop the database,
> Are you sure you want to delete the database (Y/N) ?

By the way, I am trying to query everything through command prompt.
tools used: MySQL, PHP, Apache.
Could you please help me to implement the scripts...or provide examples or links.
thanks for reading...!