Could any one tell me why this script fails, only on some computers. It
works fine on all computers at work, but some clients seem to have a
promblem with loging
in, and it is not the passcheck that is failing I�m quite sure of that,
so it must be the check for session that is failing so could any one
tell me what could be wrong?
Thanks
<?php
session_start();
session_register("uid");
session_register("sid");
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="css/style.css" type="text/css">
</head>
<body bgcolor="#999999" text="#000000">
<p>Dominews</p>
<table width="550" border="0" cellspacing="0" cellpadding="1"
bgcolor="#000000" align="center">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="20"
bgcolor="#CCCCCC">
<tr>
<td class="maintext">
<?php
if(!IsSet($stage)){
print("<form name=\"login\"
action=\"$PHP_SELF\">");
print("<input type=\"hidden\"
name=\"stage\" value=\"1\">");
print("<table>");
print("<tr><td
class=\"maintext\"><b>Notendanafn:</b></td><td><input
name=\"check_username\" type=\"text\"></td></tr>");
print("<tr><td
class=\"maintext\"><b>Lykilor�:</b></td><td><input name=\"check_passwd\"
type=\"password\"></td></tr>");
print("<td> </td><td><input
type=\"submit\" value=\"Skr� inn\"></td></tr>");
print("</table>");
}
else{
include("db_connect.php");
$query = "select id,
passwd, system from users where username = '$check_username'";
$mysql_result =
mysql_query($query, $db);
$row =
mysql_fetch_row($mysql_result);
if((crypt($check_passwd,
'dominos') == $row[1]) && (($system == 0 || $system == 1 ))){
$sid =
session_id();
$uid =
$row[0];
print("<a
href=\"add_item.php\">[N� grein]</a><br>");
print("<a
href=\"view_edit.php\">[Breyta greinum]</a>");
}
else if($session ==
session_id()){
print("<a
href=\"add_item.php\">[N� grein]</a><br>");
print("<a
href=\"view_edit.php\">[Breyta greinum]</a>");
}
else{
print("��
ver�ur a� skr� �ig inn. <a href=\"index.php\">[Skr� inn]</a>");
}
}
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p>
<p> </p>
</body>
</html>
<http://www.atom.is/> ------------------------
Dav�� �rn J�hannssson
Vefforritari
------------------------
At�mst��in hf.
Gar�astr�ti 37
101 Reykjav�k
------------------------
s�mi: 595-3643
fax: 595-3649
<mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
<http://www.atom.is/> http://www.atom.is
------------------------