brijesh
How to reset a cookie?
1 Answer(s)      4 years and 8 months ago
Posted in : PHP

How to reset a cookie

Advertisement
View Answers

November 12, 2010 at 5:41 PM


// to create a cookie

Cookie c=new Cookie("name",request.getParameter("name"));

//to Add cookie String name=request.getParameter("name"); response.addCookie(c);

//to reset cookie or delete cookie

Cookie c=new Cookie("name","null");

response.addCookie("name")