how to destroy cookies when the browser is closed? i have a php script where initially the user logs in and then the subsequent pages are displayed.i want that if the user closes the browser in between n tries to re-open the same page, he gets the error message that he has to login first (i.e the cookies which i have set once the user is logged in shud be destroyed once the user closes the browser.I am able to destroy my cookie after log out,but don't know how to destroy this when I will close the browser.
carobee
0
Posting Whiz in Training
Recommended Answers
Jump to Postyou can destroy the cookie by closing the browser if you set the cookie through javascript.
Jump to PostYou can use PHP and javascript together.I have never thought of solving your problem in PHP.
All 7 Replies
ryan_vietnow
13
Posting Pro
carobee
0
Posting Whiz in Training
ryan_vietnow
13
Posting Pro
carobee
0
Posting Whiz in Training
ryan_vietnow
13
Posting Pro
carobee
0
Posting Whiz in Training
scottholmes
12
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.