Please refer to PHPcode & lt; for the creation question ;? Phperror_reporting (E_ALL & amp ;~ E_NOTICE); echo & quot; & lt; center & gt; & quot; if (! $ _ POST [& quot; question_num & quot;]) {echo & quot; & lt; h2 & gt; find out the code about the creation problem.
PHP code
";if (!$_POST["question_num"]){ echo "create question"; echo "
"; echo "fuck";}else if (!$_POST["question_num"]){ echo "create question"; echo "
";}else{ $num=$_POST["question_num"]; $f=$_POST["f"]; $sql="insert into question(`f`,`t`,`content`)values"; for ($i=0;$i<$num;$i++) { $content=$_POST["question"][$i]; $t=$_POST["to"][$i]; $sql=$sql."('".$f."','".$t."','".$content."')"; if ($i<$num-1) $sql=$sql.","; } include 'config.php'; $re=mysql_query($sql); if ($re) { echo "create question successful!"; echo ""; echo "clickhereto add answer"; }}echo "
";?>
There is no problem with the database, that is, when I enter the number of questions and click next, I will go directly to the next page to add answers... what should have been implemented is to query question. if there is a problem with the quantity and no problem with the content, go to the else if and execute the loop creation problem... why never go in .. please advise me ..
------ Solution --------------------