Re: Session Problem
| From: | Marek Kilimajer | Date: | Fri, 22 Nov 2002 20:11:17 +0000 |
| Subject: | Re: Session Problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125657@lists.php.net to get a copy of this message | ||
Seems like the remote server has register_globals off. You must use $_GET, $_POST, $_SESSION ...
Cesar Aracena wrote:
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