header


header

s.no Teacher_Name
1 Carmen

Creating Cookies

<!DOCTYPE html> <?php setcookie("Auction_Item", " Bus", time() + 2 * 24 * 60 * 60); ?> <html> <body> <?php echo "cookie is created." ?> </body> </html>

output:

cookie is created.

Deleted Cookies

<!DOCTYPE html> <?php setcookie("Action_Item", "Bus", time() + 2 * 24 * 60 * 60); ?> <html> <body> <?php setcookie("Action_Item", "", time() - 60); ?> <?php echo "cookie is deleted" ?> </body> </html>

output:

cookie is deleted

Retrive Cookies

<!DOCTYPE html> <?php setcookie("Action_Item", "Bus", time() + 2 * 24 * 60 * 60); ?> <html> <body> <?php echo "Action Item is a " . $_COOKIE["Action_Item"]; ?> </body> </html>

output:

Action Item is a Bus