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...

What is the different between cookies and session in php?

Answer Posted / vivek srivastava

Sessions: are basically tokens which are generated when a
user proceeds with a login mechanism. Each time when a user
logged into a website a new and unique token is generated
and it will destroyed whenever he/she logged out from that
site or power goes off. However, session information is
temporary and will be deleted after the user has left the
website.

Cookies:are temporary files which are store in users hard
disk. A cookie is often used to identify a user. Suppose a
user enters into a website and without logging off he/she
closed the page, next time when he/she open the page he/she
found himself/ herself logged in. This is because of
cookies, they store the user information. We can set the
cookies by <b>setCookie()</b> function. The syntax if
setCookie function is <b>setCookie(name, value, expire,
path, domain);</b>.

Is This Answer Correct ?    30 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is php dead 2019?

947


How send email in php?

979


What are the advantages and disadvantages of cascade style sheets?

1144


Can you specify the "new line" character in single-quoted strings?

966


Is multilevel inheritance possible in php?

965


What is print_r?

902


Can I include php in javascript?

1075


How to increase the maximum execution time of a script in php?

974


How I can control asset documents without GR/IR?

1630


What is a controller in php?

1002


Is php easier than javascript?

996


What are the benefits of composer?

1011


How to get complete current page url in php?

1060


What is the purpose of the '.frm' file extension? What do thes file contain?

970


Write an example to remove html tags from a string in php?

926