over 9 years ago
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
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>
<?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)