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

2. Drawback of cookies is they are less secure. For example,
if you are using windows machine, cookies will be stored in
cookies folder. So others can copy that file and paste in
his machine. So that he can login with other user's
username and password.

I have answered in this way. Next question from the
interviewer was 'How can we make cookies secure ?' :-(
Anybody please answer this question.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I display text with a php script?

477


What does the scope of variables mean?

529


Is null in php?

530


How values in arrays are indexed?

595


Does php have block scope?

523






Tell me what types of loops exist in php?

565


How do you define a constant?

545


What are the different types of PHP arrays?

567


How to include a file to a PHP page?

586


What is csrf token and how will you add csrf token in ajax?

523


Which function would you use to replace a record in a database in php?

585


Explain Type hinting in PHP?

561


Why json is used in php?

538


Write down the code for save an uploaded file in php.

528


Why do we use cookie?

545