Creating table with variable name php mysql -
i'am trying create table variable name , columns via forms here's query
$execute = mysql_query('create table '.$tname.'( '.$cname.' '.$ctype.' )');
and it's creating table name variable $tname
doesnt create columns.
try this:
$sql= "create table $tname($cname $ctype(45),$cname $ctype(50))"; //echo $sql; $op =mysql_query($sql);
Comments
Post a Comment