Categories
PHP

Session Fixation: Changing Session ID

Session fixation exploits a weakness in your PHP script. Especially, if you do not generate a new session id for users when authenticating them.

Categories
PHP

Creating Sessions Without Cookies

How to use PHP sessions if the client browser does not support (or blocked) cookies?

Categories
PHP

Reading, Writing, and Removing Sessions

In this tutorial, we discuss how to use PHP sessions, showing how sessions are started and ended and how session variables are used.

Categories
PHP

Understanding Sessions

A session is a way to identify and manage the state of a particular user. HTTP does not know any kind of session mechanism; the protocol is stateless. However, PHP comes with built-in session support that makes it fairly easy to use sessions.

Categories
PHP

Saving Form Data into a Cookie

How to use cookies to store/save form data.

Categories
PHP

Saving Multiple Values in One Cookie

Learn how to store multiple values (array) in one cookie.

Categories
PHP

Check If Cookies are Allowed or Blocked

This code snippet demonstrates how to test if the cookies are enabled on the client or not.

Categories
PHP

Setting a Cookie with Language Preference

Learn a very basic PHP trick for setting up a cookie for a multilingual website.

Categories
PHP

Escaping Special Characters and Quotes in Cookies

What is the difference between setcookie() and setrawcookie() function?

Categories
PHP

Understanding HTTP Cookies

How to send and retrieve data as part of the HTTP header in the form of a cookie.