zoukankan      html  css  js  c++  java
  • 项目:学生查看自己的作业情况和分数(php)

    <?php
    include '../includes/db.ini.php';
        try
        {
            $sql='SELECT work_id,title,work_text,score_value
                  FROM homework;';
            $result=$pdo->query($sql);
            $cnt=$result->rowCount();
        }
        catch (PDOExpecyion $e)
        {
            
        }
        if ($cnt!=0)
        {
            while($row=$result->fetch())
            {
                $outputcheck[]=array('work_id'=>$row['work_id'],'title'=>$row['title'],'work_text'=>$row['work_text'],'score_value'=>$row['score_value']);
            }
            include '../student/checkhomeworkout.php';
        }
        else 
        {
            echo 'wrong';
            exit();
        } 
    ?>
    <html>
    </html>
    <head>
    </head>
    <body>
    <?php
    foreach ($outputcheck as $out):
        
    ?>
    <a href="">
    <?php echo $out['work_id'].' '.$out['title'].' '.$out['work_text'].' '.$out['score_value'];?></br>
    </a>
    <?php endforeach;?>
    </body>
    </html>
  • 相关阅读:
    nginx 的请求处理阶段
    docker 的实践操作
    inno setup 1
    缓存算法
    think in uml-关系
    centos mono
    think in uml 2.1
    TFS 创建分支
    think in uml 1
    WebCast课程列表2
  • 原文地址:https://www.cnblogs.com/yangxiaohong/p/5385735.html
Copyright © 2011-2022 走看看