Cookies, Sessions, and HTTP authentication

+1 Brandon Bennett · February 6, 2015
How do i go about setting up the ability to give users cookies and start sessions on paid hosting?

Post a Reply

Replies

Oldest  Newest  Rating
0 Calvin Sienatra · February 8, 2015
Umm? Isn't it just the same?
//ADD SESSION
$_SESSION['username'] = "bob123";

//ADD COOKIE
$_COOKIE['username'] = "bob123";


Maybe your problem is at the browser not accepting cookies/cookies are turned off.
0 Brandon Bennett · February 10, 2015
oh, alright. Thanks!
0 Jay Deshaun · February 12, 2015
The only thing about session's is that before you could store a session variable, you would need to start a session first.

More can be found here:
http://www.w3schools.com/php/php_sessions.asp
  • 1

PHP

107,123 followers
About

Server-side, HTML embedded scripting language used to create dynamic Web pages.

Links
Moderators