Jump to content
MakeWebGames

Hey, my website wont login using firefox but will using chrome, any idea how to fix?


Recommended Posts

Posted (edited)

Hey, my website wont login using firefox but will using chrome, any idea how to fix?

this is the script.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link REL="SHORTCUT ICON" href="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="verify-v1" content="pMDKM2LbJ9bWFFDLss67Py+RqL9EEM6pmuHow/aVFjo=" /> 
<title>Gangster-Society:V2</title>
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #999999;
}
body {
background-color: #000000;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
a {
font-size: 10px;
color: #999999;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #999999;
}
a:hover {
text-decoration: none;
color: #999999;
}
a:active {
text-decoration: none;
color: #999999;
}
.button
{width: 200px; height: 50px;margin-top: 0px; margin-bottom: 0px;
background-color: #000000; color: #ffffff; cursor: pointer;
border-left: 0px solid #ffffff; border-right: 0px solid #ffffff;
border-top: 0px solid #ffffff; border-bottom: 0px solid #ffffff;
font-size: 10px; font-family: verdana; background-image:
url(http://i42.tinypic.com/nzn48x.jpg);}
.menu { color: #FFFFFF;
font-size: 10px; font-family: verdana; width: 98%;
background-color:#000000; border:2px solid #000000;width: 150px;}
.menu1
{color: #FFFFFF; font-size: 10px; font-family: verdana; width: 98%;
background-color:#131313; border:2px solid #000000;width: 150px;}
-->
</style>
<!--[if !IE 9]><!-->

<style type="text/css">

/*<![CDATA[*/

div.e9 {padding: 127px 0 0 4px; align: left; text-align:left; color:#aaa; width:318px float:left;}

/*]]>*/

</style>

<!--<![endif]-->



<!--[if IE 9]>

<style type="text/css">

/*<![CDATA[*/

div.e9 {padding: 138px 0 0 4px; align: left; text-align:left; color:#aaa; width:318px float:left;}

/*]]>*/

</style>

<![endif]-->
</head>




<body OnLoad="document.login.mail.focus();">
<center>
<p>
<img src="backgroundnew.jpg" width="900" height="500" />
<form id="form1" name="form1" method="post" action="">
 <table width="700" border="0" cellspacing="0">
   <tr>
     <td colspan="4" align="center" class="style1"><?php




if(isset($_SESSION['user_id'])) {
// if already logged in.
session_unset();
session_destroy(); 





echo "<label>You have been logged out.</label>";




}




if(isset($_SESSION['user_id'])) {
// if already logged in.
mysql_query("UPDATE login SET online='No' WHERE id = '".$_SESSION['user_id']."'");
session_unset();
session_destroy(); 


echo "<label><font color=red><b>You have been logged out!</b></font></label>";

}

if(isset($_GET['logout'])){
$logout=strip_tags(addslashes(htmlspecialchars($_GET['logout'])));
mysql_query("UPDATE login SET online='No' WHERE name='".mysql_real_escape_string($logout)."'");
}


if($_POST['submit']){
$query = "SELECT password,id,state,sitestate,name FROM login WHERE name='".mysql_real_escape_string($_POST['name'])."'"; 
$result = mysql_query($query) or die(mysql_error());
$row = mysql_fetch_array($result);
if($_POST['password'] != $row['password']){
echo "<font color=red><b>You could not be logged in! Username and/or password do not match.
Please try again!</b><br><br>Go to [url]www.gangster-society.co.uk[/url] To Re-Login</font>";
}else{

$_SESSION['user_id'] = $row['id'];
$_SESSION['user_status'] = $row['state'];

$result = mysql_query("UPDATE login SET userip='".mysql_real_escape_string($_SERVER['REMOTE_ADDR'])."' WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."'")
or die(mysql_error());


if($row['sitestate'] == "1"){
header("Location: banned.php?name=".$row['name']."");
}

if($row['sitestate'] == "2"){
$namer=$row['name'];
include 'dead.php';
die();
}

if(($row['sitestate'] == "0") or ($row['sitestate'] == "9")){
mysql_query("UPDATE login SET online='Yes' WHERE name='".mysql_real_escape_string($_POST['name'])."'"); 
header("Location: game.php");
}

}// password check.
}// if isset submit.
?></td>

  </tr>
   <tr>
     <td align="right" class="style1"><img src="username.png" width="200" height="45" /></td>
     <td width="150" align="center"><input name="name" type="text" class="textboxi" id="name" style='width: 80%;'/></td>
     <td width="20" align="right" class="style1"><img src="password.png" width="200" height="45" /></td>
     <td width="150" align="center"><input name="password" type="password" id="pass" class="textboxi" style='width: 80%; ' maxlength="20"/></td>
   </tr>
   <tr>
     <td height="35" colspan="4" align="right"><input type="image" name="submit" value="Login" src="login.png"value=""/>      </td>
   </tr>
</br>
<tr>
<br>
<a href="register.php"><img src="images/register.png" /></a>
<a href="forgotpass.php"><img src="images/forgotpassword.png" /></a>
<a href="tos.php"><img src="images/tos.png" /></a></td>
</br>
®copyright Gangster-Society 2012-2015®</br>
Game only works with GOOGLE CHROME! AS it was made using Chrome, so download chrome unless you already have it.




</br>




</tr>




 </table>




</form>




</center>




</body>




</html> 
Edited by Dominion
added code tags
Posted

You send me a PM LearningCoder with exactly the same info, and I told you post something in the forums WITH MORE INFO... how do you expect we can help you? Give us at least some link to test it, or show us the code.

Posted

server2.gangster-society.co.uk if you register and try to login using firefox it wont log you in, but if you use chrome it lets you login, i need to know how to make it more compatible with all browsers.

Posted
You could not be logged in! Username and/or password do not match. Please try again!

 

Go to http://www.modern-mafia.com To Re-Login

I lol'd.

Anyway...

<input .... onfocus="if(this.blur)this.blur()">

The blur hook, is triggered when the element isn't "focus"'d anymore.

So that means, with the simplest logic,

if(this.blur)

Equates to false, thus the form isn't executed.

Posted

Opening the web page:

document.login is undefined

(Check the error console of firefox)

Register:

grabit is not defined

Also your form:

<form id="form1" name="form1" method="post" action="">

I doubt a action="" is good...

Posted

Also your form:

<form id="form1" name="form1" method="post" action="">

I doubt a action="" is good...

Doesn't matter, it's valid HTML.

@LearningCoder:

Remove the Javascript code within the onfocus attribute.

Posted

Only chrome works for me, for your login... If you look into firefox and click the source code the errors are in red and if you hover over them they will tell you your problem with your html but as others has said its that onload stuff probably causing it

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...