1.Where are the cookies storing ?
2.What is the drawback of using cookies ?
3. If two site is having same cookie name and different
values what will be the output if we echo the cookie name
from those sites ? How can we solve this issue (How can we
specify the domain name)?

Answer Posted / meenakshisundaram

1.Cookies are stored in Client side.
2.i.If more than 20 cookie variables stored in client side then error may occur "size of cookie exceed the limit" like that...
ii.To overcome this, we can store these cookies in single array. but anyway if the size of the cookie exceed the limit then again same error will occur. Only we can solve the count of cookie variable limit by using array.
3.Yes we can pass the domain details as a parameter while creating cookie itself

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is static variable in php?

606


Where session is stored?

533


Is PHP runs on different platforms (Windows, Linux, Unix, etc.)?

524


How do I get csrf token?

553


What is mvc in php?

532






How to know user has read the email-php?

495


What is the main function of php?

524


How does php and apache work?

530


What is an anti csrf token?

498


Is it possible to extend the execution time of a php script?

491


What does odbc do in context with php?

571


How do you pass a variable by value?

579


Which is incorrect with respect to separating php code and html?

534


Why sessions are used in php?

505


How is it possible to know the number of rows returned in result set?

523