Ad block is installed and active. Please support us by disabling it.
HomeFriday, September 22, 2017, 00:47:32
1

PHP Cookies - setcookie

Tuesday, February 10, 15, 14:02:45, 3 Yaers Ago Via wain, Hits: 2596
Defines a cookie to be sent along with the rest of the HTTP headers.
Example:
Code:
<?php
setcookie("cookieuser", "username", time()+3600);
setcookie("cookiepass", "password", time()+3600);
print_r ($_COOKIE);
?>


Delete Cookies:
Code:
<?php
setcookie ("cookieuser", "", time() - 3600);
setcookie ("cookiepass", "", time() - 3600);
print_r ($_COOKIE);
?>

Sign In

Sponsor

Related

Creating a CAPTCHA with PHP :: PHP Tutorial

Captcha Image, This tutorial will show you how to create a form with Captcha.

Filter Words in PHP - PHP Tutorial

Filter bad words in PHP, requirement(s): PHP server

How to set up password for phpMyAdmin in Wamp Server

Password for phpMyAdmin in Wamp

Block Visitors From Specific IP Address

Learn How To Restrict Users From Different IP Addresses.

PHP Trim

trim() Strip whitespace (or other characters) from the beginning and end of a string.

PHP $_POST Function

Collect values from a form sent with method post

PHP form with file upload

Advanced Contact Form with email and form field validation. It allows your visitors to send you an email directly from your website.

Preg_Match - PHP Form Validation

PHP form validation with preg_match

PHP File Create

Create and write data to a file using the php frwite function.

PHP Links Script 1.1.

This script allows you to manage your links using a MySQL database. It features easy install, user submission, and an admin panel to add, edit and remove categories and links. The script is easy to customize to suit your needs.
About Author

wain

Date Registered: Sun, Feb 8, 15
Last Time Online: Thu, Jun 15, 17
So far has created 115 entries.
wain
This author has not yet filled in any details.