Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to add a cookie?

Answer Posted / rupali

bool setcookie ( string $name [, string $value [, int
$expire [, string $path [, string $domain [, bool $secure
[, bool $httponly ]]]]]] )
for e.g.
<?php
$value = 'something from somewhere';

setcookie("TestCookie", $value);
setcookie("TestCookie", $value, time()+3600); /* expire in
1 hour */
setcookie("TestCookie", $value, time()
+3600, "/~rasmus/", ".example.com", 1);
?>

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I run a php script?

1096


What is mysql_fetch_object?

1002


Tell me what kind of things have you done on the social side?

927


How can you encrypt password using php?

1001


Write the statements that are used to connect php with mysql

939


How to get no. of rows using MYSQL function?

1029


Why many companies are switching their current business language to php?

1061


Is php front end?

882


Which software is best for php?

961


What is the use of htmlspecialchars in php?

946


Tell me how can you pass a variable by reference?

905


What is the function file_get_contents() usefull for?

938


What is user defined function in php?

932


What is the purpose of break and continue statement?

927


What is php default argument?

968