Hi there.
I am trying to figure out how to make a table from a form.
It doesn't seem to be working.
Also you might notice that I am trying to make the table name dynamic.
Could someone check this over and let me know what the problem might be?
Thank you
Puto
<?php
$magicbean = 'magicbean';
mysql_query($query);
if $_POST['party'];
{
mysql_connect(server', 'login', 'pass');
mysql_select_db($magicbean);
"CREATE TABLE " . $username . " (
id INT NOT NULL AUTO_INCREMENT,
name VARCHAR(20) NOT NULL,
PRIMARY KEY(id))";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<form action="http://magicbean.ca/partyname.php" method="post">
<table width="392" border="0" cellpadding="0">
<tr>
<th scope="col">Please enter the ID for the new party. </th>
</tr>
<tr>
<td><div align="center">
<input type="text" name="party" />
</div></td>
</tr>
<tr>
<td><div align="center">
<input type="submit" name="Submit" value="Submit" />
</div></td>
</tr>
</table>
</form>
</body>
</html>