I have an html form passing variable information to a php file that will create a mysql table (hopefully) using the value of one of the variables... The html form has an input called (lastname).
In the php file I am trying to define the variable "$usertable" as $lastname and then... Create a table as follows:
$usertable = (`$lastname`);
$con = mysql_connect($hostname,$username,$password);
if (!$con)
{
die('Could not connect ' . mysql_error());
}// Create table in $dbname database
mysql_select_db($dbname, $con) or die(mysql_error());
$sql = 'CREATE TABLE `$usertable` ('
. ' `ID` INT(6) NOT NULL AUTO_INCREMENT, '
. ' `first` VARCHAR(20) NOT NULL, '
. ' `middle` VARCHAR(15) NOT NULL, '
. ' `last` VARCHAR(20) NOT NULL, '
and so on... But the table it is creating is called "$usertable" NOT the value of the input ("lastname").
Can anyone help me with this?