LearningCoder Posted March 26, 2012 Posted March 26, 2012 <!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"> * /*<=!=[=C=D=A=T=A=[*/ * *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"> * /*<=!=[=C=D=A=T=A=[*/ * *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($_G* ET['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>Go to <a href="http://www.gangster-society.co.uk" target="_blank">www.gangster-society.co.uk</a> 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> * <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> this is the script, it only works using google chrome and only lets you login using chrome, can someone fix this please? Quote
HauntedDawg Posted March 26, 2012 Posted March 26, 2012 Unfortunatly, you have way to many issue's it seem's. Also, follow advice, and don't beg. <?php if(isset($_SESSION['user_id'])) { session_unset(); session_destroy(); echo '<label>You have been logged out.</label>'; exit; } if(isset($_SESSION['user_id'])) { mysql_query("UPDATE login SET online='No' WHERE id = ".intval($_SESSION['user_id'])); session_unset(); session_destroy(); echo "<label><font color=red><b>You have been logged out!</b></font></label>"; exit; } 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>Go to <a href="http://www.gangster-society.co.uk" target="_blank">www.gangster-society.co.uk</a> 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"); } } exit; } ?> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta name="verify-v1" content="pMDKM2LbJ9bWFFDLss67Py+RqL9EEM6pmuHow/aVFjo=" /> <link href="/extra_internetexplorer.css" rel="stylesheet" type="text/css" /> <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: 0;} 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">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"> 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"></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" src="login.png" /></td> </tr> </br /> <tr> <td><a href="register.php"><img src="images/register.png" /></a></td> <td><a href="forgotpass.php"><img src="images/forgotpassword.png" /></a></td> <td><a href="tos.php"><img src="images/tos.png" /></a></td> </tr> </table> </form> </p> <p>®copyright Gangster-Society 2012-2015®</p> </center> </body> </html> Untested! Quote
Dominion Posted March 26, 2012 Posted March 26, 2012 What's wrong with the answer posted @ http://makewebgames.io/showthread.php/41314-Hey-my-website-wont-login-using-firefox-but-will-using-chrome-any-idea-how-to-fix ? Quote
HauntedDawg Posted March 26, 2012 Posted March 26, 2012 On another. WHY THE EFF arnt you encoding people's password's? Quote
Ishraq Posted March 26, 2012 Posted March 26, 2012 So he can take their email and see if the passwords match. Then....... Quote
LearningCoder Posted March 27, 2012 Author Posted March 27, 2012 I tried what it said in there and it didnt work, and it still isnt working :( Quote
HauntedDawg Posted March 27, 2012 Posted March 27, 2012 Unfortunately you sir, is not going to get any help. Your supposed to copy the script into yours. Not try what it said. Quote
Spudinski Posted March 27, 2012 Posted March 27, 2012 I'm not going to help because you use plaintext passwords. Quote
LearningCoder Posted March 28, 2012 Author Posted March 28, 2012 hey guys, i figured it out :) i looked at what ou said and put it into my code, thanks for your help. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.