I have a form with 2 buttons. The names of the buttons are selected. The values are delete or update. Now this is the code below. I just want to be able to delete and if the button delete is pushed a confirm to be shown. If yes is pressed on the confirm, then delete..
CODE:
If(request.getParameter("selected"=="Delete" {
out.println("<form name=confirm method=Post action=lstdog02.jsp>"
out.println("Are you sure you want to delete this record?"
out.println("<br><input type=submit name=confirm value=yes>"
out.println("<input type=submit name=confirm value=no>"
}
Else If(request.getParameter("confirm"=="yes" {
String sql1 = "Delete From K9Manager where intakeno = " + request.getParameter("f_intakeno"
PreparedStatement ps0 = db.createPreparedStatement(sql1); }
ERRORS:
Syntax: ";" inserted to complete BlockStatements
Syntax: new expected instead of this token
Syntax: ; expected instead of this token
Syntax: ";" inserted to complete ExpressionStatement
I can't find anywhere where I left out a ;.. Please help
CODE:
If(request.getParameter("selected"=="Delete" {
out.println("<form name=confirm method=Post action=lstdog02.jsp>"
out.println("Are you sure you want to delete this record?"
out.println("<br><input type=submit name=confirm value=yes>"
out.println("<input type=submit name=confirm value=no>"
}
Else If(request.getParameter("confirm"=="yes" {
String sql1 = "Delete From K9Manager where intakeno = " + request.getParameter("f_intakeno"
PreparedStatement ps0 = db.createPreparedStatement(sql1); }
ERRORS:
Syntax: ";" inserted to complete BlockStatements
Syntax: new expected instead of this token
Syntax: ; expected instead of this token
Syntax: ";" inserted to complete ExpressionStatement
I can't find anywhere where I left out a ;.. Please help