zoukankan      html  css  js  c++  java
  • 每日总结4.15

    <?php
    session_start();
    include_once 'conn.php';
    $ndate =date("Y-m-d");
    $addnew=$_POST["addnew"];
    if ($addnew=="1" )
    {
    $leibie=$_POST["leibie"];

    //lixandonxgjixelxb
    //qiuji
    //qiuhe
    //ischongfu("select id from shangpinleibie where trjrtjtrjrtj");
    $sql="insert into shangpinleibie(leibie) values('$leibie') ";
    mysql_query($sql);
    //danjuzhixi;mysql_query($sql);
    echo "<script>javascript:alert('添加成功!');history.back();</script>";
    }
    ?>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>商品类别</title>
    <!--bixanjxiqxi-->
    <script type="text/javascript" src="js/My97DatePicker/WdatePicker.js" charset="gb2312"></script>
    <link rel="stylesheet" href="css.css" type="text/css">
    </head>
    <script language="javascript">


    function OpenScript(url,width,height)
    {
    var win = window.open(url,"SelectToSort",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=no,status=yes' );
    }
    function OpenDialog(sURL, iWidth, iHeight)
    {
    var oDialog = window.open(sURL, "_EditorDialog", "width=" + iWidth.toString() + ",height=" + iHeight.toString() + ",resizable=no,left=0,top=0,scrollbars=no,status=no,titlebar=no,toolbar=no,menubar=no,location=no");
    oDialog.focus();
    }
    </script>
    <body>
    <p>添加商品类别: 当前日期: <?php echo $ndate; ?></p>
    <script language="javascript">
    function check()
    {
    if(document.form1.leibie.value==""){alert("请输入类别");document.form1.leibie.focus();return false;}

    }
    function gow()
    {
    location.href='shangpinleibie_add.php?jihuabifffanhao='+document.form1.jihuabifffanhao.value+"&id=<?php echo $_GET["id"]?>";
    }
    </script>
    <!--hxsglxiangdxongjxs-->
    <?php
    //islbd1q $sql="select * from melieibaoduqubiaoiguo where id=".$_GET["id"];
    //islbd2q $sql="select * from melieibaoduqubiaoiguo where hsgzhujian='".$_SESSION["username"]."'";
    //islbdq $query=mysql_query($sql);
    //islbdq $rowscount=mysql_num_rows($query);
    //islbdq if($rowscount>0)
    //islbdq {
    //islbdq lelelelelele
    //islbdq }
    ?>
    <form id="form1" name="form1" method="post" action="?id=<?php echo $_GET["id"]?>">
    <table width="100%" border="1" align="center" cellpadding="3" cellspacing="1" bordercolor="#00FFFF" style="border-collapse:collapse">
    <tr><td>类别:</td><td><input name='leibie' type='text' id='leibie' value='' style='border:solid 1px #000000; color:#666666' />&nbsp;*</td></tr>


    <tr>
    <td>&nbsp;</td>
    <td><input type="hidden" name="addnew" value="1" />
    <input type="submit" name="Submit" value="添加" onclick="return check();" style='border:solid 1px #000000; color:#666666' />
    <input type="reset" name="Submit2" value="重置" style='border:solid 1px #000000; color:#666666' /></td>
    </tr>
    </table>
    </form>
    <p>&nbsp;</p>
    <?php
    function ischongfu($sql)
    {
    $query=mysql_query($sql);
    $rowscount=mysql_num_rows($query);
    if($rowscount>0)
    {
    echo "<script>javascript:alert('对不起,您输入的tsisshistxiaojxi已经存在,请重试!');history.back();</script>";
    exit;
    }

    }
    ?>
    </body>
    </html>

  • 相关阅读:
    详细解释:nginx中Nginx Main Module(主模块)配置及各个参数含义
    windows form (窗体) 之间传值小结
    利用C#转换图片格式,还可转换为ico
    修复IE默认主页——注册表篇
    如何截获数据库操作时来自服务器的错误返回码
    C#将代码中的信息保存为txt或ini文件
    修改IE为默认浏览器
    C#中winform窗体常用设置
    各种数据源的连接字符串的写法
    什么是CS和BS结构,两种结构的区别
  • 原文地址:https://www.cnblogs.com/wanghaoning/p/14915475.html
Copyright © 2011-2022 走看看