ok i want a protected password for my all my pages, but i have a user system, so i want a popup saying please login to view site, and i want my members to be able to use their username and password. so ya i need helpzorz
protected password>>>.<<<
Started by fudgy, Jun 22 2008 11:34 AM
3 replies to this topic
#1
Posted 22 June 2008 - 11:34 AM
#2
Posted 22 June 2008 - 03:32 PM
use their username and password for what?
anyways use sessions, and check to see if the session is set...
anyways use sessions, and check to see if the session is set...
<?php
if (isset($_SESSION['username'])) {
echo ("I am logged in!");
}else{
echo "<script>alert('Please login to view this page!');</script>";
}
?>
I think that's what your talking about. if not, maybe someone else can help.
#3
Posted 22 June 2008 - 04:09 PM
Not sure why you have a user system but yet no login to use it? Simply search Pixel2Life for "login", as bigdfbc2008 mentionned, it relies mostly on sessions.
#4
Posted 23 June 2008 - 05:01 AM
no i do have a login script, but never mind i got it
Edited by fudgy, 23 June 2008 - 05:01 AM.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
