Session problems with FireFox, not IE
Posted: Thu Mar 16, 2006 11:40 pm
On the login page, I have this code at the top of the page:
Followed by this code for the login:
The user logs in fine.
But.... once I load up my next page, the user isnt logged in anymore. The next page has this code at the top:
Followed by this code:
Do I need to do something different with the session varibles? It works in IE but I have to login again in FireFox.
Code: Select all
<?php session_start(); ?>Code: Select all
$sql="SELECT * FROM `accounts` WHERE name = '$username' AND passworddb = '$password'";
$result=mysql_query($sql) or die(mysql_error());
$number = mysql_num_rows($result);
if ($number == "1") {
session_register("password");
session_register("username");But.... once I load up my next page, the user isnt logged in anymore. The next page has this code at the top:
Code: Select all
<?php session_start(); ?>Code: Select all
<?php
$sql="SELECT * FROM `accounts` WHERE name = '$username' AND passworddb = '$password'";
$result=mysql_query($sql);
$number = mysql_num_rows($result);
if ($number == "1") {