note 91366 added to control-structures.while
| From: | denniedv at gmail dot com | Date: | Mon, 08 Jun 2009 15:57:13 +0000 |
| Subject: | note 91366 added to control-structures.while | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-156477@lists.php.net to get a copy of this message | ||
include("includes/dbconnect.php");
$sql= mysql_query("SELECT userid, Username, Password, Type
FROM tblusers
WHERE Username='$username' AND Password='$password'");
if (!$sql)
{
die(mysql_error());
}
$count = mysql_num_rows($sql);
if($count==1) {
$_SESSION['login'] = 1;
$_SESSION['username'] = $username;
$_SESSION['ip'] = $_SERVER['REMOTE_ADDR'];
while ($row = mysql_fetch_assoc($sql))
{
$_SESSION['userid'] = "{$row['userid']}";
$_SESSION['type'] = "{$row['Type']}";
}
}
----
Server IP: 69.147.83.197
Probable Submitter: 78.21.38.98
----
Manual Page -- http://www.php.net/manual/en/control-structures.while.php
Edit -- https://master.php.net/note/edit/91366
Del: integrated -- https://master.php.net/note/delete/91366/integrated
Del: useless -- https://master.php.net/note/delete/91366/useless
Del: bad code -- https://master.php.net/note/delete/91366/bad+code
Del: spam -- https://master.php.net/note/delete/91366/spam
Del: non-english -- https://master.php.net/note/delete/91366/non-english
Del: in docs -- https://master.php.net/note/delete/91366/in+docs
Del: other reasons-- https://master.php.net/note/delete/91366
Reject -- https://master.php.net/note/reject/91366
Search -- https://master.php.net/manage/user-notes.php