Home  >  Article  >  Backend Development  >  成绩如何求出来? 来说下思路

成绩如何求出来? 来说下思路

WBOY
WBOYOriginal
2016-06-13 10:09:21873browse

成绩怎么求出来? 高手进来说下思路

PHP code
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--><?php $strConn="odbc:driver={microsoft access driver (*.mdb)};dbq=".realpath("db.mdb");    $conn = new PDO($strConn);    if($_POST["tj"]=="交卷"){                 //求成绩和                exit();    }    ?>
query('select * from st where id='.$y); $row = $dsn->fetch(); $str=$row['daan']; $q=explode("|",$str); echo ''; echo ''; echo ''; }?>
'; echo $i.'.'.$row['s_name'].'
'; echo ''; echo ''; echo ''; echo '
    '; echo ''; echo '
  • '.$q[0].'
  • '; echo '
  • '.$q[1].'
  • '; echo '
  • '.$q[2].'
  • '; echo '
  • '.$q[3].'


老师要求我们写个考试系统,
  要求:
  1.随即从数据库取8条试题(不可重复)
  2.然后就是求成绩了,(这难到了我)
   
  听说PHP版有很多高手,求思路,求例子

------解决方案--------------------
把题目的id和答题者对该题的答案提交到后台,然后根据id选出正确的答案对比,记录分数求和。
------解决方案--------------------
1.过滤post过来不需要的数据
2.数组和 直接有函数

helloyou0大吃一斤...这作业有什么难度?
Statement:
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