You might be searching for how to set a raw cookie in php. So here is a simple example which shows how to set a raw cookie.
To set a cookie use the function "setrawcookie"
setrawcookie() is exactly the same as setcookie() except that the cookie value will not be automatically urlencoded when sent to the browser.
This function accepts different number of arguments or parameters as setcookie. You can see the php reference manual of setcookie function here for more details.
In the following example we are passing 3 parameters
1) cookie name - its the name by which cookie will be identified.
2) cookie value - its the value stored in cookie.
3) expiration time - the time till the cookie will be available, after that it will be destroyed.
You can set the cookie by using above function.
more details can be found here.
Blogs I read
Categories
- php (32)
- php functions (9)
- Introduction (8)
- html (8)
- css (6)
- javascript (6)
- MySQL (2)
- firefox (2)
- php bugs-errors (2)
- php interview questions (2)
- MySQL functions (1)
Blog Archive
-
▼
2009
(45)
-
►
September
(14)
- Show random quotes on page every time a page is re...
- Split string with php explode function and print a...
- Caution while using JavaScript
- Javascript Acceleration
- This is for Horizontal Menu.
- Show random quotes on page refresh with php
- Display text file contents on webpage in php
- Factorial of a number in php
- Restrict the text in textarea - limit the length o...
- Generate a random password in php
- onclick select the text of a textarea
- Center all contents of website - cetering a websit...
- Javascript to show how many characters are remaini...
- PHP for converting numbers into words (upto one la...
-
►
August
(9)
- Simple css 1 level Vertical navigation menu
- Simple css 1 level horizontal menu
- Create a login box with css, html
- free php scripts and free php codes
- Create a database connection file in php mysql
- How to get ip in php ?
- Fill select tag with php - fill select tag of form...
- Show A-Z links for Pagination
- Warning: mysql_num_rows(): supplied argument is no...
-
►
September
(14)
Posted by
vaibhavsk
Dec 17, 2009
Labels:
php,
php functions
Subscribe to:
Post Comments (Atom)