基于用户的新闻系统!之三
保存个人资料的文件!注册文件之三
<%@ include file="inc.jsp" %>
<%@ include file=
"myDate.jsp"%>
<%
String uID=request.getParameter(
"UID");
String sql=
"select * from pmusers where uID='"+uID+"'";
ResultSet rs=apple.select(sql);
if(rs.next())
{
apple. closeConn();
response.sendRedirect(
"yihan.jsp");
return;
}
else
{
apple. closeConn();
String name=request.getParameter(
"UID");
String password=request.getParameter(
"password");
String email=request.getParameter(
"email");
String gender=request.getParameter(
"gender");
String city=request.getParameter(
"city");
String tel=request.getParameter(
"tel");
String adrees=request.getParameter(
"adrees");
String publishTimes=
"100";
String Date=MyDate1;
boolean go;
sql=
"insert into pmusers(uID,password,email,name,gender,city,tel,adrees,Date,publishTimes) values ('"+uID+"','"+password+"','"+email+"','"+name+"','"+gender+"','"+city+"','"+tel+"','"+adrees+"','"+Date+"','"+publishTimes+"')";
//out.println(sql);
go = apple.insert(sql);
if(go)
{
session.setAttribute(
"uIDS",uID);
session.setAttribute(
"password",password);
response.sendRedirect(
"reglogin.jsp");
}
else out.println(
"Failed.");
}
apple. closeConn();
%>

lunzi   2004-12-04 21:01:46 评论:0   阅读:1021   引用:0

发表评论>>

署名发表(评论可管理,不必输入下面的姓名)

姓名:

主题:

内容: 最少15个,最长1000个字符

验证码: (如不清楚,请刷新)

Copyright@2004-2010 powered by YuLog