Greeting
I'm building a scrip for my clients, they know "zero" about data bases, but i want them to been able to install a database by theyself (with out the phpMyAdmin or other like that), so this is what I have so far;
First I create a database
<?
If (mysql_create_db ("control")) {
echo("Success");
} else {
echo("Failure");
}
?>
That's the easy part
Then it has to create a USER y then GRANT him all permits, that's the part i don't know how to build.
Finally the script shoud create a table just like this;
<?
$connection = mysql_connect("localhost", "main_user", "user0123") or die ("Failure!");
mysql_select_db($database);
mysql_query("CREATE TABLE signups (
id int(255) UNSIGNED NOT NULL AUTO_INCREMENT,
name TEXT NOT NULL,
address TEXT NOT NULL,
city TEXT NOT NULL,
state TEXT NOT NULL,
zip TEXT NOT NULL,
country TEXT NOT NULL,
phone TEXT NOT NULL,
email TEXT NOT NULL,
domain TEXT NOT NULL,
plan int(20) NOT NULL,
username TEXT NOT NULL,
password TEXT NOT NULL,
date TEXT NOT NULL,
payment TEXT NOT NULL,
status TEXT NOT NULL,
PRIMARY KEY (id)
);");
mysql_close($connection);
?>
Can someone fill the red part before I go insane?
🙁
Thanks
[cobalto]