我的添加怎么有误?
<%int add=0;
String name=request.getParameter("name");
String pwd=request.getParameter("pwd");
String sql="insert into user (name pwd)values=('"+name+"','"+pwd+"')"; %>
<%
try{
add=stmt.executeUpdate(sql);//总提示这行有误
if(add>0){
out.print("<script>alert('添加成功')</script>");
}
else
{out.print("<script>alert('添加有误')</script>");}
}
catch(Exception e){
out.print("出现异常");}
stmt.close();
conn.close();%>