PHPLIB & Sessions
| From: | phplist at james-central dot com | Date: | Sun, 17 Sep 2000 11:47:35 +0000 |
| Subject: | PHPLIB & Sessions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-17104@lists.php.net to get a copy of this message | ||
Here are little pieces of code right now of my source code. What I want is to
make sessions so that I don't check for a username/password on everypage. Right
now if you goto recipes.php3?action=memberarea&username=aaaaaa&password=bbbbbb
it works, but I don't want that big string, i want to work in sessions, but I
don't know how PHPLib works!
Everytime it goes into a new area, IE,
if($action == "search") {
$result = mysql_query("SELECT * FROM members where username LIKE '$username'");
$myrow = mysql_fetch_array($result);
if($username == $myrow["username"] && $password == $myrow["password"]
&&
$username && $password) {
//show search stuff
} else {
// show login info
}
}
This is after every action, is there a way i can have a session thing? Please
answer ASAP, it is for a job!
James Smith