Session and Cookies in PHP


   What is the difference between Session and  Cookies in PHP ?                                                              
     There are given following differences between Session and Cookies in PHP.

      PHP COOKIES 
  1.  It store data at client side browser as text file format.           
  2. It store limit amount of Data.                                                             
  3. It store only 4kb (4096 bytes) file.                                    
  4. It doesn’t hold multiple variables.                               
  5. It is less secure.                                                                       
  6. We can set the expiry time of cookie                                   
  7. Cookies function must be appear before the HTML.         

     PHP SESSION
  1. It stores large amount of   data.                                    
  2. It holds multiple variables in sessions.
  3.  It holds multiple variables in sessions.
  4.  It is secure in compression to cookies.
  5.  session_destroy() function we can destroy .
  6. session function must be appear before the 

     

agyanadda

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

1 $type={blogger}:

  1. This comment has been removed by a blog administrator.

    ReplyDelete