hello Dany web friends
how to use cookies session in php, how to insert cookie in database table to rember user,
i would like to rember what page a user viewed on my website... and i think i can use cookie for SESSION but i don't know how to use.
chrisschristou
0
Posting Whiz
Recommended Answers
Jump to PostSessions and cookies in this context have different uses. A cookie will sit on the user's machine for the duration stipulated in setcookie or until it is wiped/overwritten by the site or cleared manually by the user. A session cookie on the other hand is pretty much done once the …
Jump to PostYou can't use anything on a session for 8 days. It'll expire as soon as the user closes the browser, or at the session expire limit.
When you say the user submits a form containing title, description, and user id: How is the user id generated for temporary users? I …
Jump to PostWhat is a typical or example value for
$_SESSION['MM_Username']
and is that ever shown to the user?
Jump to PostIf $_SESSION['MM_username'] is never shown to the user then for temp users you can use a different value there. Instead of the email they haven't provided, use an md5 hash of a random number, just make sure to double-check the DB and see that someone else hasn't already rolled that …
Jump to PostAside Note
Check CodeIgniter (CI) framework you can find an example of what you want to achieve, refer to their session library, here you can find the documentation:
Basically they do what Lsmjudoka is suggesting, so you have to create a table like this one:
…
All 24 Replies
diafol
chrisschristou
0
Posting Whiz
Lsmjudoka
0
Junior Poster in Training
chrisschristou
0
Posting Whiz
Lsmjudoka
0
Junior Poster in Training
chrisschristou
0
Posting Whiz
chrisschristou
0
Posting Whiz
Lsmjudoka
0
Junior Poster in Training
chrisschristou
0
Posting Whiz
cereal
1,524
Nearly a Senior Poster
Featured Poster
chrisschristou
0
Posting Whiz
Lsmjudoka
0
Junior Poster in Training
chrisschristou
0
Posting Whiz
chrisschristou
0
Posting Whiz
chrisschristou
0
Posting Whiz
Lsmjudoka
0
Junior Poster in Training
chrisschristou
0
Posting Whiz
Lsmjudoka
0
Junior Poster in Training
chrisschristou
0
Posting Whiz
Lsmjudoka
0
Junior Poster in Training
chrisschristou
0
Posting Whiz
Eagle.Avik
0
Junior Poster in Training
chrisschristou
0
Posting Whiz
chrisschristou
0
Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.