So what would happen if you cleared cookies in your browser before the 10 seconds was up? It wouldn't display 'username', right?
@goldenVIN201212 жыл бұрын
message 'Notice: Undefined index: username in C:\xampp\htdocs\series\alex's example\cookie\view.php on line 3' will come out if the time is expired,how can i fix this?
@eskilwinstedt4968 жыл бұрын
What do I do if I accidentally ate the cookie? Need help
@eskilwinstedt4968 жыл бұрын
+robert robillard thanks, will try that. I don't really understand how it's supposed to work but I trust you because you can always trust people on the internet.
@flyinglack7 жыл бұрын
XD
@pranavreddy21979 жыл бұрын
Notice: Undefined index: username in C:\xampp\htdocs ew on line 3 help me
@PINOYako2158 жыл бұрын
same here can any body please help ???
@nadeemkhalani58958 жыл бұрын
same here....!!!
@svkrclg7 жыл бұрын
put a backslash setcookie('username', 'alex', time()+20, "/");
@nikhilwadhwa55135 жыл бұрын
Please let me know if anyone knows that how many cookies and sessions can be created in a website using PHP Technology?
@cjvaans44848 жыл бұрын
It works with using time(). But when the cookie expires it shows Undefined index.
@psamuelsandeepkumar13 жыл бұрын
@MrJohnPringle. that is because of the error_reporting setting in your php.ini file. change it accordingly and u shouldn't be getting it anymore. put it as error_reporting = E_ALL & ~E_NOTICE
@MARCOWAF112 жыл бұрын
Ey. Thanks Alex, but I'm wondering: I didn't get how you get to the 'parent directory' page??
@LeftistUprising11 жыл бұрын
Why don't you make the cookie expire when the user logs out (i.e. session destroyed)?
@MrGuzrin7 жыл бұрын
Sir how can set cookies for other browse
@kostasnikoloutsos51729 жыл бұрын
Cookie seems not to be that mysterious now :)
@FFWDEntertainment13 жыл бұрын
I think Bucky should redo this series when he has time, every time I start to try to memorize something, alex goes "ummmm why isn't this working, oh yeah I forgot the most important part,let me just change that at the speed of light and switch screens."
@Polybius_Arcade10 жыл бұрын
Would you really use cookies for login purposes nowadays?
@awesomejackify33337 жыл бұрын
if you are getting the error Notice: Undefined index: username in C:\xampp\htdocs ew on line 3 put the setcookies script in another file and the echo cookie script in another file good luck :)
@mdz73724 жыл бұрын
How to make cookie logger
@JasonRichardTesch9 жыл бұрын
Wow. The day when someone explains to me what a cookie is /:
@paulperole9 жыл бұрын
+Jason Tesch long story short, a cookie is a little file stored on the visitor's computer, where you can add and use various pieces of information; a basic example would be storing info about whether the user is a new visitor or an existing one, OR maybe whether the user has clicked or not on a certain button on the site. hope this helps!
@Technologism4 жыл бұрын
Cookies is not good for login Rather sessions
@LatinoWebStudio2 жыл бұрын
Thanks for the video!
@Madgod71111 жыл бұрын
You cannot create a permanent cookie. However you can create one with a very long experation time. stackoverflow(dot)com/questions/6865259/php-permanent-cookie
@luqmanafridi3338 жыл бұрын
you deLiver SIR a good concept in very concise way. U Do weLL job
@Pradeep16807 жыл бұрын
HTML5 cookies better than PHP ??
@cjvaans448411 жыл бұрын
I like cookies, especially with chocolate chips on top.
@camelCaseFTW11 жыл бұрын
pretty damn good idea you got there
@nO_d3N1AL10 жыл бұрын
I thought all time in programming languages are set from 1st January 1970, dunno why you thought 1990s lol. Great tutorials though
@iinsanebaby13 жыл бұрын
PROGRAMMIN IS FUN!
@phuccon12 жыл бұрын
i use netbeans IDE 7.2
@zewax370411 жыл бұрын
If you would like an easy way to set time in cookies you could paste in this simple function ( pastebin.com/T6hSgrC6 ), made by me. This is how you use it: timeAdd(3, "d") This sets time 3 days from now. This is how it should be looking in the setcookie: setcookie("cookiename", "cookievalue", timeAdd(3, "d")); Here's the values you're able to use in the second string: "m" - Minute "h" - Hour "d" - Day "W" - Week "M" - Month "Y" - Year The first value requires only a int which will be how many, for example, years the cookie should stay if "Y"-case. The function might not always be accurate because some months doesn't always have 31 days.