Session Problem

From: Date: Fri, 22 Nov 2002 19:59:25 +0000
Subject: Session Problem
Groups: php.general 
Request: Send a blank email to php-general+get-125655@lists.php.net to get a copy of this message
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

« previous php.general (#125655) next »