how to insert checkbox values especially image url to mysql using jsp
A:
You have to connect to the database, either directly via JDBC or via an ORM like Hibernate.
Then you simply issue a query or create an persist an object which stores your data.
ThiefMaster
2010-05-17 10:27:27
+1
A:
Give all checkboxes the same name
but a different value
.
<input type="checkbox" name="checkbox" value="foo">
<input type="checkbox" name="checkbox" value="bar">
<input type="checkbox" name="checkbox" value="baz">
Then you can obtain them in the servlet using HttpServletRequest#getParameterValues()
.
String[] checked = request.getParameterValues("checkbox");
BalusC
2010-05-17 13:33:32