i have a login page which checks the user login...this works by fetching the data from the database and it is working....
but when i type the url of the second page it is getting displayed....i want all the user to enter through the first page...please tell me how to achieve tat
lydia21
9
Junior Poster
Recommended Answers
Jump to Postwhen the user logs in, put his username to the session. Eg.
//After logging in, add his name to the session.$_SESSION['user']=$username;
Then in each page, check if $_SESSION is not null. If its null, then use header function to redirect the user back to the first page. If its …
All 3 Replies
nav33n
472
Purple hazed!
Team Colleague
Featured Poster
lydia21
9
Junior Poster
nav33n
472
Purple hazed!
Team Colleague
Featured 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, networking, learning, and sharing knowledge.