Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to Create and Use Cookies in PHP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 113
    Comment on it

    Cookies are basically small text files that is stored in browser and it is use for tracking purpose.

    Cookies are also use for remember me functionalities.

    Setting Cookies with PHP

    setcookie(name, value, expire, path, domain, security);
    

    For Example:

    <?php
       setcookie("name", "John Watkin", time()+3600, "/","", 0);
       setcookie("age", "36", time()+3600, "/", "",  0);
    ?>
    <html>
    
       <head>
          <title>Setting Cookies with PHP</title>
       </head>
    
       <body>
          <?php echo "Set Cookies"?>
       </body>
    
    </html>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: