i just want to ask how to use REPLACE function in JSP to escape single quote like addslashes() in PHP
my code is
String task_name= request.getParameter("task_name");
String rep_task_name=task_name.replace("\'","\\\'");
st2 = con.createStatement();
st2.executeUpdate("UPDATE taskes SET task_name='"+rep_task_name+"');
thanks
thanks for ur replay
the full code is
so u mean i should be change the statements and use con.prepareStatement function