Quote:
I've checked multiple times but I couldn't find any syntax error
You are not told there is a syntax error, you are told there is a logical error !
Quote:
Parameter index out of range (6 > number of parameters, which is 5).
This means that your code is wrong :
Connection con=ConnectionProvider.getCon();
PreparedStatement ps=con.prepareStatement("update users set address=?,city=?,state=?,country=?,mobileNumber=?");
ps.setString(1, address);
ps.setString(2, city);
ps.setString(3, state);
ps.setString(4, country);
ps.setString(5, mobileNumber);
ps.setString(6, email);
ps.executeUpdate();