archivo html:
Código HTML:
<form action="ListaGuardada.php" method="post"> Fecha<input type="text" name="f_date1" id="f_date1" maxlength="10"><button id="f_btn1">Seleccionar</button><br>
Código PHP:
mysql_query("ALTER TABLE Asistencias ADD COLUMN '$_POST[f_date1]' varchar(255) NOT NULL")or die(mysql_error());
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''2012-05-08' varchar(255) NOT NULL' at line 1