Please take a look at this code on issues related to creation

Source: Internet
Author: User
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 "";    echo "
  
"; echo "fuck";}else if (!$_POST["question_num"]){ echo "create question"; echo " "; echo ""; 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 --------------------

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.