I have php questions..please give me some ideas...
1. how can I destroy php session if the browser is close?
2. if i have textboxes and it contains data from the database. how can i destroy or expire the data the moment i press back in the browser.
3. in a textbox, when i have used the text box type some numbers and letters on it. If I have finished processing it, the next time i enter another entry, a drop down with my previous inputs will appear...how do i remove it (except pressing delete) to remove it permanently.
4. How to do this:


I wanted to output only HEL and remove the remaining letters.

4 Years
Discussion Span
Last Post by lloydsbackyard

Careful not to mix up client behaviour and serverside behaviour. With PHP, the session lives until PHP expires the session or it is manually purged by your code. When a browser is closed, it will delete any session cookies in its cache which includes the cookie that was created by your PHP script to identify the serverside session. When it launches, it will not submit this cookie, and hence, PHP creates a new session for the browser - however the old session technically still exists serverside and can be used or hijacked if any client submits the previous valid cookie for that session.

To have the browser 'notify' your PHP script that it is closing will require javascript hooks like mentioned by pritaeas, which you will need to process to purge/unset the relevant session.


thanks.pritaeas and.TomH.PG..thanks for your thoughts..

im done with substring..

do you have any links for further readings about my questions 1 and 2? i read some other sites but i still dont get the applicable solution.


I have 5th question.

i used firefox in developing my project. but when i open it in internet xplorer, the design was destroyed. why?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.