Is it your register_globals setting?

---John Holmes...

----- Original Message -----
From: "Cesar Aracena" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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
[EMAIL PROTECTED]
[EMAIL PROTECTED]
(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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to