<%@ include file="../import.include" %> <% String errormessage = ""; String infomessage = ""; boolean doThis = true; /** VALIDATE VARIABLES */ long plsuploadID = 0; try { plsuploadID = Long.parseLong(request.getParameter("plsuploadID")); } catch (Exception e){ errormessage = "Check your id value. Cannot identify particular property."; doThis = false; } /** SET VALUES */ adminmembers.Properties map = new adminmembers.Properties(); map.select(plsuploadID); /** DELETE RECORD */ if (doThis) { // errormessage = "Member ("+map.getNickname()+") was not deleted. Rules for deleting members still has to be set."; try { map.delete(plsuploadID); infomessage = "Property ("+map.getLocation1()+","+map.getLocation2()+") was successfully deleted."; } catch (SQLException e) { errormessage = "Check your values. Property ("+map.getLocation1()+","+map.getLocation2()+") was not deleted."; } } /** AFTER EVERYTHING, POINT TO INDEX */ response.sendRedirect("../properties/listings.jsp?infomessage="+infomessage+"&errormessage="+errormessage+" "); %>