☰
✕
Главная
© 2002 - 2025
Diary.ru
PHP Cookies
netcat-na-diary
| вторник, 21 января 2014
PHP Cookies
The
setcookie()
function is used to set a cookie.
Note:
The setcookie() function must appear
BEFORE
the tag.
setcookie(name, value, expire, path, domain);
<?php setcookie("user", "Alex Porter", time()+3600); ?> <html> ...
<?php setcookie("user", "Tanya", time()+3600); ?> <!DOCTYPE HTML> <html> <head> </head> <body> <?php if(isset($_COOKIE["user"])) { echo "Welcome " . $_COOKIE["user"] . "!<br/>"; } else { echo "Welcome, guest!<br />"; } ?> </body> </html>
PHP
PHP Cookies
Смотрите также
Коротко о погоде
Птичий дворик расчеты
Страх отвержения
Сериальное. Спойлеры!
Кекекеке
из записок садовода