Home > Backend Development > PHP Tutorial > 求大神看看这个关于创建有关问题的代码

求大神看看这个关于创建有关问题的代码

WBOY
Release: 2016-06-13 13:06:37
Original
947 people have browsed it

求大神看看这个关于创建问题的代码

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
<?php error_reporting(E_ALL & ~ E_NOTICE);
echo "<center>";
if (!$_POST["question_num"])
{
    echo "<h2>create question</h2>";
    echo "
Copy after login
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
create those questions is belong to"; echo ""; echo "
how many question will you want to create
"; echo "fuck"; } else if (!$_POST["question_num"]) { echo "

create question

"; echo ""; echo ""; $num=$_POST["question_num"]; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; for ($i=0;$i"; echo ""; echo ""; echo ""; } echo ""; echo ""; echo ""; echo ""; echo "
contentresult
question".($i+1).": "; echo ""; echo "
"; } else { $num=$_POST["question_num"]; $f=$_POST["f"]; $sql="insert into question(`f`,`t`,`content`)values"; for ($i=0;$i"; echo "clickhereto add answer"; } } echo "
"; ?>

数据库方面没有问题,就是我输入问题个数点击下一步的时候,就直接转到下一个添加答案的页面去了...本来应该实现的是,查询question,如果有问题数量没有问题内容时候,进入else if那里面,执行循环创建问题...为什么一直进去不呢..求大神指教指教..

------解决方案--------------------
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template