Archive For The PHP Category
Archive For The PHP Category
Previous Entries
How can we destroy the session, how can we unset the variable of a session?
session_destroy() function destroys all data registered to current session. use unset function to destroy varible specified with session. So to destroy $name registered with session use unset($name) in your php script.
defined. By default, such errors are not displayed to the user at all although, as you will see, you can change this default behavior. 2. Warnings: These are more serious errors for example, attempting to include() a file which does not exist. By default, these errors are displayed to the user, but they do not result in script termination. 3. Fatal errors: These are critical errors for example, instantiating an object of a non-existent class, or calling a non-existent function. These errors cause the immediate termination of the script, and PHPs default behaviour is to display them to the user when they take place. Posted in PHP | Tagged: errors, PHP | Leave a Comment
How can we encrypt and decrypt a data presented in a table using MySQL?
You can use functions: AES_ENCRYPT() and AES_DECRYPT() like: AES_ENCRYPT(str, key_str) AES_DECRYPT(crypt_str, key_str) Posted in PHP | Tagged: PHP | Leave a Comment
nl2br() inserts a HTML tag <br> before all new line characters \n in a string. echo nl2br(god bless \n you); output: god bless<br> you Posted in PHP | Tagged: PHP | 1 Comment
If we login more than one browser windows at the same time with same user and after that we close one
window, then is the session is exist to other windows or not? And if yes then why? If no then why?
Session depends on browser. If browser is closed then session is lost. The session data will be deleted after session time out. If connection is lost and you recreate connection, then session will continue in the browser. Posted in PHP | Tagged: PHP, session | Leave a Comment