Why does PHPcode & lt ;? Php $ conmysql_connect (& quot; localhost & quot;, & quot; root & quot;, & quot;); mysql_select_db (& quot; test & quot ;); mysql_query (& quot; setnamesgb231 for a question about building a test form in php
PHP code
This is the initial server config.
PHP code
";if (!$_POST["test_name"]){ echo "create test"; echo "
";}else { include 'config.php'; $content=$_POST["test_name"]; $sql="insert into question('content') values('$content')"; if (mysql_query($sql)) { echo "create test_content successfull!!!"; echo ""; echo "clickhereto add question"; } else "error!!!".mysql_error(); mysql_close();}echo "
";?>
The problem is that the form cannot be created. please help me with some advice... why is this happening... thank you.
------ Solution --------------------
$ SQL = "insert into question ('content') values ('$ content')"; // The comment symbol of content is wrong.