Beginner PHP Tutorial - 76 - Deleting Cookies with PHP

  Рет қаралды 69,375

thenewboston

thenewboston

Күн бұрын

Пікірлер: 22
@DefyAll777
@DefyAll777 9 жыл бұрын
Here is a simpler way: setcookie('username', null, 0); time() will always be greater than 0 so there is no need to call time() when unsetting. The second parameter is also not needed so it can be null.
@markonikolicphoto
@markonikolicphoto 8 жыл бұрын
That 0 instead of deleting time with minus operator will set unlimited time.
@pola587
@pola587 6 жыл бұрын
@Marko Nikolic true
@cjvaans4484
@cjvaans4484 11 жыл бұрын
Thank goodness for a short 2 minute clip. 5 clips feels so long.
@Dalwanaage
@Dalwanaage 13 жыл бұрын
Thank you for sharing your knowledge with us.
@pancake191
@pancake191 13 жыл бұрын
@LetsSpotIt it seems like that would be okay. cause time() is the current time and it's constantly changing. So even if you did time() by itself, it would expire instantly.
@lex200900
@lex200900 7 жыл бұрын
finished 76 tutorials in one day:) Thought could go for 200 :(
@nizaral-assi3173
@nizaral-assi3173 6 жыл бұрын
You learnt absolutely NOTHING!
@vswyt
@vswyt Жыл бұрын
goat @@nizaral-assi3173
@UHDking
@UHDking 12 жыл бұрын
He Alex, what about is to setcookie(' username' , '', time()+1000); If I will use this, I used this in my first cms and its worked. Is it unproper? Thanks
@LetsSpotIt
@LetsSpotIt 13 жыл бұрын
do i have to use the same amount of time when unsetting it? i think it would be fine as long as the timestamp is earlier than current time (so time()-1 is ok?)
@mariellevaldez
@mariellevaldez 8 жыл бұрын
I have a question, surely when you log out you can also use session_destroy()?
@victoriarglez
@victoriarglez 8 жыл бұрын
That just will work if you are using $_SESSION's session_start();
@vyuutuube
@vyuutuube 9 жыл бұрын
@iam4eversmart88
@iam4eversmart88 12 жыл бұрын
I think any value that is
@gregorkovacic9806
@gregorkovacic9806 8 жыл бұрын
in case anyone wondered how set, delete and view cookie as sessions in previous videos: set.php: setcookie('username', 'gregor', time()+1000); unset.php: setcookie('username', 'gregor', time()-1000); view.php: if (isset($_COOKIE['username'])) { echo 'Welcome, '.$_COOKIE['username']; } else { echo 'Please log in.'; }
@MegaMalik90
@MegaMalik90 8 жыл бұрын
Hi Mr. Kovacic, I'm a total noob at this things. But I want to learn something, and I don't have anything to begin with, html, mysql whatsoever. My question is, will I really learn something if I follow this tutorial from beginning to end? I only want to make a club membership website actually, so I can arrange my database, photos etc via a web based application. Do You have any suggestion? Thank You so much in advance, Sir.
@retronexusio
@retronexusio 13 жыл бұрын
hahahaha... an sunset cookie would be great as well!
@010arman010
@010arman010 12 жыл бұрын
instead of time()-1000 I just put in time(). Is there anything wrong with that? Thanks for the vids, btw.
@soltysss
@soltysss 12 жыл бұрын
if you echo some html before setting cookie you will get error!
@JoyfulElephant
@JoyfulElephant 12 жыл бұрын
Love 2min clip
@prism560
@prism560 7 жыл бұрын
WHAT GERMANIC LANGUAGE IS THIS?
Beginner PHP Tutorial - 77 - File Handling: Writing to a File
6:56
thenewboston
Рет қаралды 100 М.
Beginner PHP Tutorial - 75 - Creating Cookies with PHP
7:42
thenewboston
Рет қаралды 140 М.
Вопрос Ребром - Джиган
43:52
Gazgolder
Рет қаралды 3,8 МЛН
Хаги Ваги говорит разными голосами
0:22
Фани Хани
Рет қаралды 2,2 МЛН
Beginner PHP Tutorial - 73 - Setting PHP Sessions
7:44
thenewboston
Рет қаралды 191 М.
Sessions & Cookies tutorial | PHP for Beginners - Part 15
11:53
The Codeholic
Рет қаралды 15 М.
Top 10 Linux Job Interview Questions
16:04
tutoriaLinux
Рет қаралды 2,4 МЛН
Сборник Эксклюзивов 2024 - Уральские Пельмени
1:33:24
Уральские Пельмени
Рет қаралды 1,5 МЛН
Real Madrid - Barcelona | Highlights | Final | Football | Spanish Super Cup
12:06
Beginner PHP Tutorial - 87 - Uploading Files: The Basics
7:43
thenewboston
Рет қаралды 144 М.
Russian secret base uncovered / Russia abandons the region
14:15
NEXTA Live
Рет қаралды 720 М.
Вопрос Ребром - Джиган
43:52
Gazgolder
Рет қаралды 3,8 МЛН