Re: Session Problem
| From: | 1LT John W. Holmes | Date: | Fri, 22 Nov 2002 20:12:07 +0000 |
| Subject: | Re: Session Problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125658@lists.php.net to get a copy of this message | ||
Is it your register_globals setting?
---John Holmes...
----- Original Message -----
From: "Cesar Aracena" <icaam@icaam.com.ar>
To: <php-general@lists.php.net>
Sent: Friday, November 22, 2002 2:59 PM
Subject: [PHP] Session Problem
Hi all,
I'm having this strange issue with a remote server. I'm trying to create
a session control for administrative use which works fine in my PC but
once I upload these scripts to that server, it doesn't recognize the
$username && $password variables and kick me right into the else{} of
the login.php script. Here's my code:
if ($username && $password)
{
$db_conn = mysql_connect("www.icaam.com.ar", "icaam",
"xxxxxxx");
mysql_select_db("icaam", $db_conn);
$query = "SELECT * FROM maraadmins WHERE adminuser = '$username'
AND adminpassword = password('$password')";
$result = mysql_query($query, $db_conn);
if (mysql_num_rows($result) > 0)
{
$row = mysql_fetch_array($result);
$valid_admin = $row['adminid'];
session_register("valid_admin");
header("Location: admin.php");
exit;
}
else
{
header("Location: ../login.html");
exit;
}
}
else
{
//header("Location: ../login.html");
//exit;
echo "nothing";
}
Any thoughts?? Thanks in advance,
Cesar L. Aracena
icaam@icaam.com.ar
caracena@infovia.com.ar
(0299) 156-356688
Neuquén (8300) Capital
Argentina
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php