can any body help me how to create a site with session on when the user login and without session when the guest visit the front page?
please pass me the sample code..
Recommended Answers
Jump to PostAt link one just take off the following code :
// connect to database include("inc/connect.php"); // include auth and nav include("inc/auth.php");
The guess will not require authorize login and the session will not generated.
And your inc/auth.php can write like this to start a login session:
…
Jump to PostAdd into the top of link1 -
$secureArea = false;
and link 2 -$secureArea = true;
then in auth.php:
<? // Login & Session example by sde // auth.php // start session session_start(); // convert username and password from _POST or _SESSION if($_POST){// if($_POST['submit'] …
All 5 Replies
vijukumar
0
Light Poster
djgoswami
0
Newbie Poster
devianleong
0
Newbie Poster
Biiim
148
Junior Poster
Biiim
148
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.