• 每日总结4.5


    <?php
    include_once 'conn.php';
    session_start();
    if($_SESSION["username"]=="")
    {
    echo "<script>javascript:alert('对不起,请您先登陆!');location.href='index.php';</script>";
    exit;
    }

    $addnew=$_POST["addnew"];
    if ($addnew=="1" )
    {

    $zhanghao=$_POST["zhanghao"];$zhaopian=$_POST["zhaopian"];$xingming=$_POST["xingming"];$liuyan=$_POST["liuyan"];
    $sql="insert into liuyanban(zhanghao,zhaopian,xingming,liuyan) values('$zhanghao','$zhaopian','$xingming','$liuyan') ";
    mysql_query($sql);
    echo "<script>javascript:alert('留言成功!');location.href='lyblist.php';</script>";
    }
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">

    <HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD>
    <TITLE>化妆品销售网站</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=gb2312">
    <LINK href="qtimages/style.css" type=text/css rel=stylesheet>
    <script language="javascript">
    function check()
    {
    if(document.form1.zhanghao.value==""){alert("请输入账号");document.form1.zhanghao.focus();return false;}if(document.form1.xingming.value==""){alert("请输入姓名");document.form1.xingming.focus();return false;}if(document.form1.liuyan.value==""){alert("请输入留言");document.form1.liuyan.focus();return false;}
    }

    </script>

    <META content="MSHTML 6.00.2900.6058" name=GENERATOR>
    </HEAD>
    <BODY>
    <?php include_once 'qttop.php';?>

    <TABLE cellSpacing=0 cellPadding=0 width=1120 align=center bgColor=#ffffff
    border=0>
    <TBODY>
    <TR>
    <TD width=5>&nbsp;</TD>
    <TD vAlign=top width=230>
    <?php include_once 'qtleft.php';?>
    </TD>
    <TD vAlign=top width=10>&nbsp;</TD>
    <TD vAlign=top>
    <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
    <TBODY>
    <TR>
    <TD vAlign=bottom height=40>
    <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
    <TBODY>
    <TR>
    <TD width=58 height=40><IMG height=35
    src="qtimages/B0039.gif"
    width=30></TD>
    <TD width=14>&nbsp;</TD>
    <TD width=278><span class="red"><strong>在线留言</strong></span></TD>
    <TD vAlign=bottom align=right width=66></TD>
    <TD vAlign=bottom align=right width=354>&nbsp;</TD>
    <TD width=97 align=left ><strong><a href="lyblist.php"><font class="red">查看留言</font></a></strong></TD>
    </TR>
    </TBODY></TABLE></TD></TR>
    <TR>
    <TD bgColor=#dadada height=1></TD></TR>
    <TR>
    <TD bgColor=#f6f6f6 height=4></TD></TR>
    <TR>
    <TD bgColor=#ffffff height=6><table width="96%" border="1" align="left" cellpadding="3" cellspacing="1" bordercolor="#B8D8E8" style="border-collapse:collapse">
    <form name="form1" method="post" action="">
    <tr>
    <td>账号:</td>
    <td><input name='zhanghao' type='text' id='zhanghao' value='<?php echo $_SESSION["username"];?>' />
    &nbsp;*</td>
    </tr>
    <tr>
    <td>照片:</td>
    <td><input name='zhaopian' type='hidden' id='zhaopian' value='<?php echo $_SESSION["zp"];?>' />
    <img src="<?php echo $_SESSION["zp"];?>" width="131" height="102"></td>
    </tr>
    <tr>
    <td>姓名:</td>
    <td><input name='xingming' type='text' id='xingming' value='<?php echo $_SESSION["xm"];?>' />
    &nbsp;*</td>
    </tr>
    <tr>
    <td>留言:</td>
    <td><textarea name='liuyan' cols='50' rows='8' id='liuyan'></textarea>
    &nbsp;*</td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td><input type="hidden" name="addnew" value="1" />
    <input name="Submit" type="submit" class="hsgbutton" onClick="return check();" value="确定" />
    <input name="Submit2" type="reset" class="hsgbutton" value="重置" /></td>
    </tr>
    </form>
    </table>
    </TD>
    </TR></TBODY></TABLE>
    </TD>
    <TD width=5>&nbsp;</TD></TR></TBODY></TABLE>
    <?php include_once 'qtdown.php';?></BODY></HTML>
  • 相关阅读:
    JAX-RS:@PathVariable @RequestParam @ModelAttribute等参数绑定注解详解
    关于重定向RedirectAttributes的用法
    数据库事务的四大特性以及事务的隔离级别
    电脑打开任务管理器出现卡顿
    IDEA: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value
    git学习命令
    python 输入 与如何查看文档 小结
    python formatters 与字符串 小结 (python 2)
    Hibernate 配置文件与实体类
    python编码问题 与 代码换行问题
  • 原文地址:https://www.cnblogs.com/wanghaoning/p/14915424.html
Copyright © 2020-2023  润新知