my database consist of 2 columns username and balance. username has the value Mike, and balance has the value null. i am trying to update balance, but for some reason it doesn't update. also i don't get any errors. any suggestions
<p>This is the deposit page</p>
<form action="deposit.jsp" method="POST">
<label>deposit: </label><input type="text" name="deposit"><br>
<label>name: </label><input type="text" name="name"><br>
<input type="submit" value="deposit">
<%
String deposit=request.getParameter("deposit");
String name=request.getParameter("name");
try{
Connection conn = null;
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","root","root");
Statement st=null;
st=conn.createStatement();
st.executeUpdate("update username set balance='"+deposit+"' where username='"+name+"'");
}
catch(Exception e){
System.out.println(e);
}
%>
</form>
</body>
</html>