The Code Im trying to do is something like this:
if ($_POST['submit'])
{
$sql = mysql_query("INSERT INTO database_name.table_name (name,text) VALUES ('" . $_POST['name']. "', " . $_POST['text'] . "');");
$create = mysql_query("CREATE TABLE database_name.'".$_POST['name']."' ('id' INT NOT NULL AUTO_INCREMENT PRIMARY KEY, 'name' VACHAR(50) NOT NULL) ENGINE = MyISAM;");
__________________________________________________________________________________
What am i doing wrong? The codes are only reading the first line which is "...INSERT INTO...."
PLEASE HELP ^_^ thanks
Yes, Im writing a Database Admin Tool... It will help me upload and take down things from site faster ^_^
The INSERT INTO works perfect... Its just the CREATE TABLE does do anything
**** The CREATE TABLE doesn't**** sorry for typo
The table and the INSERT are going two different places,
I want to the INSERT to go to my CATEGORIES and the CREATE TABLE to be named what ever the name of the new CATEGORY is, SO i can add things later to that table with a different form
if ($_POST['submit'])
{
$sql = mysql_query("INSERT INTO database_name.table_name (name,text) VALUES ('" . $_POST['name']. "', " . $_POST['text'] . "');");
$create = mysql_query("CREATE TABLE database_name.'".$_POST['name']."' ('id' INT NOT NULL AUTO_INCREMENT PRIMARY KEY, 'name' VACHAR(50) NOT NULL) ENGINE = MyISAM;");
__________________________________________________________________________________
What am i doing wrong? The codes are only reading the first line which is "...INSERT INTO...."
PLEASE HELP ^_^ thanks
Yes, Im writing a Database Admin Tool... It will help me upload and take down things from site faster ^_^
The INSERT INTO works perfect... Its just the CREATE TABLE does do anything
**** The CREATE TABLE doesn't**** sorry for typo
The table and the INSERT are going two different places,
I want to the INSERT to go to my CATEGORIES and the CREATE TABLE to be named what ever the name of the new CATEGORY is, SO i can add things later to that table with a different form