HELLO! I am trying to edtit my database data using jsp. I have already created edit.jsp (which is ok) and update.jsp. The problem is that while i click edit it saves data as null in database.
You only send the id as request parameter,
update.jsp?id=<%=rs.getInt(1)%>
the other parameters have null values since they not are present in the request.
update.jsp?id=<%=rs.getInt(1)%>&email=<%=rs.getString(4)%> Try this and you gonna get a non null email.
Best regards,
PD: Try a html form better than encode the parameters in the get url.
try to trace your update query and found out if the parameters from edit.jsp reach update.jsp
Some considerations,
- Never concatenate query string use instead a prepared statement.
- Never access data base from view tier.
- Avoid using get and use post http requests.
Best regards,
I guess everyone has an angle. Fine, what do you want? Just know that you cannot have this tiny ad:
a bit of art, as a gift, the permaculture playing cards