I am trying to add a column in teacher table the name of the column is given by text field the code is here
$name= cleanString($_POST['prog']);
$query_1="alter table teacher add '$name' varchar(40) null";
if (!mysql_query($query_1, $link)){
echo mysql_error();
}
but it gives the error like "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 ''students' varchar(40) null' at line 1"
but when I use the query $query_1="alter table program_course add 'students' varchar(40) null";
this query works fine and there is no error any body who can help me about it please