comm_update.jsp
资源名称:shop.rar [点击查看]
上传用户:yatiankong
上传日期:2014-05-16
资源大小:5604k
文件大小:2k
源码类别:
Applet
开发平台:
Java
- <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
- <jsp:useBean id="customerBean" class="MyFly.Bean.customerBean" scope="request"/>
- <jsp:useBean id="loginBean" class="MyFly.Bean.loginBean" scope="request"/>
- <%
- request.setCharacterEncoding("gb2312");
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <title>无标题文档</title>
- </head>
- <body>
- <%
- String name;
- String userName;
- String sex;
- String brief;
- String address;
- String mobile;
- String telephone;
- String email;
- name=request.getParameter("name");
- userName=request.getParameter("userName");
- sex=request.getParameter("sex");
- brief=request.getParameter("brief");
- address=request.getParameter("address");
- mobile=request.getParameter("mobile");
- telephone=request.getParameter("telephone");
- email=request.getParameter("email");
- //loginBean.setName(name);
- customerBean.setName(name);
- customerBean.setUserName(userName);
- customerBean.setSex(sex);
- customerBean.setBrief(brief);
- customerBean.setAddress(address);
- customerBean.setMobile(mobile);
- customerBean.setTelephone(telephone);
- customerBean.setEmail(email);
- if(customerBean.update2() == 1)
- {
- out.println("<Script language=JavaScript>alert('更新成功');javascript:history.back();</Script>");
- }
- else
- {
- out.println("<Script language=JavaScript>alert('更新失败');javascript:history.back();</Script>");
- }
- %>
- </body>
- </html>