Hello
I am sure there is an easy way to do this, but I am stuck. I have a client who does not know anything about php, mysql, html or even computers for that matter. I have created a show ticket tracking system for them. My client needs to be able to create a new table for each event at their theater easily. What I would like to do is have a form with a text field where they can type the name of their event and when they click the submit button a table would be created in the mySQL database with the same name as the name typed in the text field. I think this would involve passing the information in the text field as a variable. but I am not sure. Below is the start of my code for the create table.
<?
$username = "";
$password = "";
$db_name = "";
mysql_pconnect("localhost","$username","$password");
echo
mysql_db_query("$db_name","CREATE table table_name (Seat_ID VARCHAR(15) NOT NULL,
PRIMARY KEY( Seat_ID ),
Level VARCHAR( 15 ) NOT NULL,
Section CHAR(1) NOT NULL,
Row CHAR(3) NOT NULL,
Seat CHAR(2) NOT NULL,
Status VARCHAR (15) NOT NULL )")
or die("Error! Reason: " . mysql_error());
?>
I would like to have the table_name replaced with the information that was typed into the text field in the form.
Thanks
Stan Forrest