php提交资料审核

<html>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">
<body>
<div id="formbackground" style="position:absolute; width:100%; height:45%; z-index:-1"><img src="head.png" width="100%" height="45%" /></div>
    <br><br><br>
    &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
    &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
    &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
    &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
    &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
    &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
    <?php 
    session_start();
    echo $_SESSION['Student_Name'];
    ?>
 <?php 
   // session_start();
    header("Content-Type:text/html;charset=gbk");
    $link0="链  接  :";
    $link00=iconv("UTF-8","gbk",$link0);
    echo "<br><br><br><br><br>&nbsp&nbsp&nbsp&nbsp$link00";
    $link1="综合考评细则";
    $link11=iconv("UTF-8","gbk",$link1);
    echo "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<a href='/school/studentA/detail/detail1.html' style='text-decoration:none'>$link11</a>";
    $link2="德育考评细则";
    $link22=iconv("UTF-8","gbk",$link2);
    echo "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<a href='/school/studentA/detail/detail2.html' style='text-decoration:none'>$link22</a>";
    $link3="额外加分细则";
    $link33=iconv("UTF-8","gbk",$link2);
    echo "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<a href='/school/studentA/detail/detail3.html' style='text-decoration:none'>$link33</a>";
 ?>
 <div style="margin-left:0px; margin-top:20px; width:30px; height:30px;"><a href="/school/studentA/apply/apply.php"><img src="1.png"></a></div>
<div style="margin-left:0px; margin-top:75px; width:30px; height:30px;"><img src="2.png"></a></div>
<div style="margin-left:0px; margin-top:70px; width:30px; height:30px;"><a href="/school/studentA/moral/moral.php"><img src="3.png"></a></div>
<div style="margin-left:0px; margin-top:70px; width:30px; height:30px;"><a href="/school/studentA/sum/sum.php"><img src="4.png"></a></div>
<div style="margin-left:0px; margin-top:70px; width:30px; height:30px;"><a href="/school/studentA/exam/exam.php"><img src="5.png"></a></div>
<form  action="1150.php" method="post"> 
<table  style="margin-left:304px;margin-top:-480px;" border=1 bordercolor="#6E6E6E" cellpadding="15" frame="box" rules="all">
    <br><br>
    <?php
    header("Content-Type: text/html;charset=gbk");
    $con=mysql_connect("localhost","root","9277");  
            mysql_select_db("School",$con);  
            mysql_query("set names 'gbk'");  
            $i=0;
            $verifyClass=$_SESSION['Student_Class'];
            $result=mysql_query("SELECT * FROM `Add`where Class='$verifyClass'");//mysql_query 查询数据库的函数
            $hd=$_SESSION["Student_Class"];
            $hf=mysql_query("select count(*) from `Add`where Class='$hd'");
            while($num=mysql_fetch_array($hf)){
                $_SESSION["Addnum"]=$num[0];
            }
            $status1="比赛名称";$status11=iconv("UTF-8","gbk",$status1);
            $status2="获得奖项";$status22=iconv("UTF-8","gbk",$status2);
            $status3="加分";$status33=iconv("UTF-8","gbk",$status3);
            $status4="比赛说明";$status44=iconv("UTF-8","gbk",$status4);
                echo "<tr align=\"center\"  bgcolor=\"#F7F7F7\">
                <td style=\"width:150px;\">Class</td><td style=\"width:150px;\">Name</td><td style=\"width:150px;\">ID</td>
                <td style=\"width:150px;\">$status11</td><td  style=\"width:250px;\">$status22</td><td>$status33</td><td style=\"width:300px;\">$status44</td>
                </tr>";
            while($row=mysql_fetch_array($result)){
                $i=$i+1;
                if($i%2==1){
                    echo "<tr align=\"center\">
                <td>$row[2]</td><td>$row[0]</td><td>$row[1]</td>
                <td>$row[3]</td> <td>$row[4]</td>
                <td><input type=\"text\" name=add$i /></td> <td>$row[6]</td>
                </tr>";
                $_SESSION["ID_Add".$i]=$row[1];
                }else{
                    echo "<tr  bgcolor=\"#DCDCDC\" align=\"center\">
                    <td>$row[2]</td><td>$row[0]</td><td>$row[1]</td>
                    <td>$row[3]</td><td>$row[4]</td> 
                    <td><input type=\"text\" name=add$i /></td> <td>$row[6]</td>
                    </tr>";
                    $_SESSION["ID_Add".$i]=$row[1];
                }
            }
?>
</table>
<table style="margin-left:1750px;margin-top:0px;">
<tr><br><br>
<?php 
    echo "<td><input type=\"submit\" name=\"submitadd\" value=\"submit\"></td>";
?>
</tr>
</table>
</form> 
</body>

</html>


后台处理

<?php  
session_start();
header("Content-Type:text/html;charset=gbk");
$i=1;
$numa=$_SESSION["Addnum"];
while($i<=$numa){
   if(isset($_POST["submitadd"])&&$_POST["submitadd"] =="submit"){
      $str1= $_POST["add".$i];  
      if($_POST["add".$i]==""){  
         echo "<script LANGUAGE='javascript'>alert('content should be null'); history.go(-1);</script>";
      }else if($_POST["add".$i]>20.00001||$_POST["add".$i]<0){
         echo "<script LANGUAGE='javascript'>alert('content is illegal'); history.go(-1);</script>";
      }else{
            $con=mysql_connect("localhost","root","9277");  
            mysql_select_db("School",$con);  
            mysql_query("set names 'gbk'"); 
           $ID= $_SESSION["ID_Add".$i]; 
           $sql="UPDATE `Add` SET `add`=\"$str1\" WHERE ID=\"$ID\"";
           $result=mysql_query($sql);          
      }   
    }
    $i++;
 }
 echo "<script LANGUAGE='javascript'>alert('sucecessfully'); history.go(-1);</script>";  //弹出提示框返回上一
?>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
经过一些时间的努力,随缘网络PHP留言板V1.0(带审核功能)总算正式发布了,该留言系统采用PHP MYSQL编写,界面色调风格延续之前asp版留言系统简洁浅蓝色风格,稍有所变动。希望大家能够喜欢。初发布,系统中难免有些小问题,希望大家在使用中有什么问题可到本站留言提出,我们将总结各问题后给予修正并升级。 以下为系统的功能简介: 1、采用div css布局经测试兼容IE及firefox主流浏览器,其他浏览器暂未测试。 2、后台可设置开启或关闭留言审核功能。 3、后台可设置诸如管理员帐号密码,留言板公告,网站标题,网站底部版权等信息。 4、采用最新版xhEditor编辑器,xhEditor是一个基于jQuery开发的跨平台开源迷你XHTML编辑器组件。 5、可批量删除,审核留言,留言IP归属地查询等。 安装说明: 1、下载本系统后,解压压缩包后,用记事本等工具打开conn.php文件,根据自已空间数据库情况配置数据库相关参数。 2、将程序按之前配置参数情况上传到指定二级目录或根目录,运行install.php页面,至此安装完成,根据提示返回系统首页,或登陆后台配置相关设置。 3、后台管理文件夹为manage 初使帐号密码:admin  admin888 最新更新内容: 1、对留言提交数据进行了过滤函数的更新。 2、安装系统智能判断安装与锁定,初次上传系统运行,系统会自动默认转到install.php安装页面,按相关提示即可完成安装! 3、更正因mysql数据库默认编码为非gbk,造成留言板数据乱码问题。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值