Wednesday, 23 May 2012
 Home arrow Blog arrow PHP: Read a browser cookie value
   
Main Menu
Home
News
Blog
Links
Search
FAQs
Spider
Articles
@intrenet
Free Softwares
Break for fun
Friends VIdeos
Techno videos
Contact Us
Disclaimer
Guest Book
Speed test
V.E.C. Calculator
IPv4 Subnet Calc
IPv6 Subnet Calc
Byte Converter
Converter
GMT/UTC Time
Bandwidth Calc
Allinone Calc
IANA Port Numbers
Country Call Codes
Pk Postal Codes
Surf Anonumously
Visitors Counter
mod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_countermod_vvisit_counter
mod_vvisit_counterToday204
mod_vvisit_counterYesterday260
mod_vvisit_counterThis week464
mod_vvisit_counterThis month5013
mod_vvisit_counterAll125689
 
 
 
 


PHP: Read a browser cookie value PDF Print E-mail
User Rating: / 0
PoorBest 
Written by Amanatullah khalil   
Sunday, 24 May 2009

PHP: Read a browser cookie value

 

Once your web application has set a cookie in a user’s browser, it is a simple matter to retrieve that value in subsequent page requests. This recipe describes reading a value from a cookie in PHP.


After a cookie with a name of ‘user’ has been set in a previous page, the value can be accessed with the global array $_COOKIE like this:

$user = $_COOKIE['user'];

Since this is a normal array, anything you can do to an array like iterate through it one value at a time. For debugging purposes, it is often useful to use this quick trick to see the whole contents of an array:

print_r($_COOKIE);

courtesy http://www.tech-recipes.com/rx/1500/php-read-a-browser-cookie-value/

 
< Prev   Next >
 
 
 
csatpk Newsflash
Statistics
OS: Linux h
PHP: 5.2.17
MySQL: 5.1.63-community-log
Time: 04:01
Caching: Disabled
GZIP: Disabled
Members: 3
News: 368
Web Links: 5
Visitors: 266047
Popular