Apr 07, 2011 — 6 comments
Here's a handy PHP code snippet which allows you to the fetch Alexa rank of website.
A cookie is an item of data that a web server saves to your computer’s hard disk via a web browser. It can contain almost any alphanumeric information (as long as it’s under 4 KB) and can be retrieved from your computer and returned to the server.
A handy PHP code snippet which detect whether the visitor is logged in or not in WordPress.
In my last post I talked about Session In PHP . Today I will be discussing Practical Use Of Session In PHP. This is going to be a straight forward tutorial, we are going store information in session and use the information across multiple pages. So let get started. Open your favorite text editor (Notepad), paste the code below in it and save as page1.php
Today, we will be looking at session in PHP. Session is a way to store information in variables to be used a crossed multiple pages. Session can be useful when you want to pass information across multiple pages and you want the information stored on the server. A simple session can be illustrated when you open an application, makes some changes then closes it. This process (opening, changing and closing of the application) represent a complete session.
A normal HTML website will not pass data from one page to another. In other words, all information is forgotten when a new page is loaded. This makes it quite a problem for tasks like a shopping cart, which requires data(the user’s selected product) to be remembered from one page to the next. Using session and cookie, helpful to keep track every movement of the visiting web page information.
If your website handles multiple subdomains and you want to retain the session while a user navigates through them. Here is a quick and easy fix.
Learn how to make a class to manage secure sessions on your PHP pages.
This is a very detailed tutorial about using PHP sessions. A session is like a variable that can transfer data between more pages.
Help us out! More and more tutorials are submitted to Good-Tutorials each day. We could use your help with finding good tutorials. Mind lending a hand?