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?

Answers were Sorted based on User's Feedback



What is the different between cookies and session in php?..

Answer / sri harsha

cookies are stored in client machine and session are stored
in server machine.

Is This Answer Correct ?    75 Yes 4 No

What is the different between cookies and session in php?..

Answer / sekhar

both are used for session tracking.

but there is some difference between these two.

cookies are stored in client side (not secured)
sessions are stored in server side (secured)

Is This Answer Correct ?    59 Yes 1 No

What is the different between cookies and session in php?..

Answer / deepinder

Cookies
- stored on CLIENT machine
- amount of data to be stored is LIMITED
- it can only store STRINGS
- quite FASTER than a session

Session
- stored on SERVER machine
- amount of data to be stored is NOT LIMITED
- it can store OBJECTS
- quite SLOWER as compared to cookies

Is This Answer Correct ?    38 Yes 2 No

What is the different between cookies and session in php?..

Answer / 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

What is the different between cookies and session in php?..

Answer / sudheer

Both are stoarage purpose but session is server side &
cookie is client side.
in cooke omly data will store but in sessions objects as
well as data stored.

Is This Answer Correct ?    17 Yes 1 No

What is the different between cookies and session in php?..

Answer / sekhar

keeping track of client request to a webserver from a
browser instance with in a predefined time is called as
session tracking.
we can perform the session tracking in 4 ways.
1) Hidden fields
2) Url rewriting
3) Cookies
4) Session/Http server sessions

Is This Answer Correct ?    16 Yes 6 No

What is the different between cookies and session in php?..

Answer / jeet

1. Session Stored data at server and session_id (PHPSESSID)
at client side(browser). Cookies stored data at client
side(browser) and each time the same computer requests a
page, it will send the cookie too.
2. Sessions are more secured than cookies as data stored at
server side.
3. Sessions can not be blocked by user from browser while
cookies can be.
4. For login Sessions fail as data is served by multiple
servers ( absence of load balancing ) while cookies do not
as stored at cliet.
5. Sessions amount of data to be stored is NOT LIMITED.
Cookies amount of data to be stored is LIMITED.
6. Sessions can store OBJECTS. Cookies can only store STRINGS.

Is This Answer Correct ?    9 Yes 0 No

What is the different between cookies and session in php?..

Answer / shivani modi (msc.cs)

A cookie is a small information that retained on the client
machine, either in rthe browser's application memory or as
a small file written to the user's hard disk.It contains
aname/value pair-
setting a cookies means associating a value with a name and
storing that pairing on the client side..
Getting or reading a cookie means using the name to retrive
the value..

Is This Answer Correct ?    8 Yes 1 No

What is the different between cookies and session in php?..

Answer / ritu

Cookies is an object but session is a process
cookie is an identifier stored on client.session is used
for storing data on the server between client requests.
cookies are stored in client mechine.session are stored in
server mechine

Is This Answer Correct ?    6 Yes 2 No

What is the different between cookies and session in php?..

Answer / abhishek asati

1.Cookies are stored in client side.
Session are stored in server side.
2.Cookies stored limited amount of data.
Session stored unlimited amount of data.
3.Cookies can only store string. Session can store object.
4.We could be save cookie for future reference but session
couldn't. When user close their browser, they also lost the
session.
5. Cookies quite faster than a session.

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More PHP Interview Questions

can anyone explain oops concept in php or give website to learn this concept clearly?

2 Answers   Nadsoft, Satyam,


Is it possible to protect special characters in a query string?

0 Answers  


Do you know how can php and html interact?

0 Answers  


How do you compare strings in java?

0 Answers  


discuss the issue of software theft in ghana and how it has affected the economy

0 Answers  


Is php a strongly typed language?

0 Answers  


explain the changes in php version

3 Answers  


i want to need upload above 100mb file,i was successfully upload 75mb using .htaccess file ,but i can put 101mb file,it was not upload..please give some tips..local server its work perfectly but online it doesn't work.. .htaccess file details AddHandler application/x-httpd-php .php php_value post_max_size 200M php_value upload_max_filesize 200M php_value memory_limit 300M php_value output_buffering on php_value max_execution_time 259200 php_value max_input_time 259200 php_value session.cookie_lifetime 0 php_value session.gc_maxlifetime 259200 php_value default_socket_timeout 259200

1 Answers  


What are Routines?

0 Answers  


What is the delimiter syntax is PHP's default delimiter syntax

0 Answers  


Which parts of php are case sensitive?

0 Answers  


what will do ceil() and floor() in PHP?

5 Answers  


Categories