Jump to content

Tuss

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Tuss's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Comes u with Mysql something line 25 and a few others. Heres the code for the page :S What i done rong? :S <?php session_start(); include_once"includes/db_connect.php"; if (strip_tags($_GET['logout']) == "yes"){ session_destroy(); }elseif (isset($_SESSION['username'])){ header("Location: logged_in.php"); exit(); } if ($_POST['Submit'] && strip_tags($_POST['username']) && strip_tags($_POST['password'])){ $username = addslashes(strip_tags($_POST['username'])); $password = addslashes(strip_tags($_POST['password'])); $ip = $REMOTE_ADDR; ///check INFO $sql = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password' AND activated='1' LIMIT 1"); $login_check = mysql_num_rows($sql); $inf = mysql_fetch_object($sql); if ($login_check == "0"){ $message="You could not be logged in"; }elseif ($login_check != "0"){ if ($login_check > "0"){ if ($inf->status == "Dead"){ include_once"dead.php"; exit(); } if ($inf->status == "Banned"){ $encoded=md5(strtolower($username)); header("Location: banned.php?banned=$username&encoded=$encoded"); exit(); } session_register('username'); $_SESSION['username'] = $inf->username; $timestamp = time()+60; mysql_query("UPDATE users SET online='$timestamp' WHERE username='$username'"); mysql_query("UPDATE users SET l_ip='$ip' WHERE username='$username'"); header("Location: logged_in.php"); } else { $message= "You could not be logged in.<br />"; }}} $total_regged=mysql_num_rows(mysql_query("SELECT * FROM users")); $admins=mysql_num_rows(mysql_query("SELECT * FROM users WHERE userlevel='2'")); $mods=mysql_num_rows(mysql_query("SELECT * FROM users WHERE userlevel='1'")); $iti=mysql_fetch_object(mysql_query("SELECT * FROM site_stats WHERE id='1'")); $most=$iti->online; ?> <link rel="stylesheet" href="includes/in.css" type="text/css"> <html> <style type="text/css"> body { font-family: Verdana; font-size: 10px; font-style: normal; font-weight: 500; font-variant: normal; color: #FFFFFF; background-color: #303030 ; } subtd2 { font-family: Verdana; font-size: 10px; font-style: normal; font-weight: 500; color: #000000; background-color: #666666; height: auto; width: auto; text-align: left; } maintd2 { font-family: Verdana; font-size: 10px; font-style: normal; font-weight: 500; color: #000000; background-color: #000000; background-position: center; height: auto; width: auto; text-align: center; } a:link { text-decoration: none; color: #33CCFF; font-weight: bold; } a:visited { text-decoration: none; color: #33CCFF; font-weight: bold; } a:active { text-decoration: none; color: #33CCFF; font-weight: bold; } a:hover { color: #FFFFFF; font-weight: bold; text-decoration: blink; }.warning { color: #FF0000; font-weight: bold; text-decoration: none; }.textbox { font-family: Verdana; font-size: 10px; color: #000000; background-color: #ffffff; border: none; } .table1px { border: 1px solid #000000; } .tabledbl { border: 2px double #FFFFFF; } .gradient { font-family: Verdana; font-size: 10px; font-style: normal; line-height: 30px; font-weight: bold; color: #FFFFFF; background-image: url(http://www.gangparadise.com/Images/tile_sub.gif); background-repeat: repeat-x; } .tableborder { font-family: Verdana; font-size: 10px; font-style: normal; line-height: normal; color: #FFFFFF; background-color: #000000; padding: 5px; } .tableborder2 { font-family: Verdana; font-size: 10px; font-style: normal; line-height: normal; color: #FFFFFF; background-color: #000000; background-image: url(includes/grad.gif); background-repeat: no-repeat; background-position: center top; padding: 5px; } .foot { border: 1px solid #000000; } </style> <head> <title>True Gangster:: Login Here!</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body background="http://i111.photobucket.com/albums/n152/cl_bullet/background.jpg" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <div align="center"> <form name="form1" method="post" action=""> <br> <table border="0" cellspacing="0" bordercolor="#000000"> <tr><td> <img src="tgi.jpg" width="999" height="98"></td> </tr> <tr><td><center><b><font color=#000000><b>Welcome, before you can officially enter True Gangster you will need to sign up by <a href=register.php><font color=red>registering</font></a>. If you are a returning member of True Gangster please login via the form below. <br> Enjoy playing the text-based mafia game please obey the rules suplied by the Admins <font color=orange>(Tuss)</font> or you will have to face the consequences.</b></font><br> </b> <br> </br> <br> </table> <table width="400" border="1" cellspacing="0" bordercolor="#000000" bgcolor="#00000" background='includes/grad.gif'> <center><tr> <br> <br> <td><center><b>Login To True Gangster</b></td> </tr> <tr> <td align="center" valign="top" bgcolor="#000000"><p class="style4"><br /> <font color=darkred size=5><b><center></center> </font></p> <p align="center" class="style4"><font color=darkred size=5><b></font><br /> Username: <input name="username" type="text" id="username" value="" size="30" maxlength="40" class="textbox"/> <br /> <br /> Password: <input name="password" type="password" id="password2" value="" size="30" maxlength="40"class="textbox" /> <br /> <br /> <input type="submit" name="Submit" value="Login" class="custombutton"/> </p> <a href=register.php><font color='1799ff'>Register</font></a> | <a href=lost.php><font color='1799ff'>Forgot Password</font></a> | <a href=faq.php><font color='1799ff'>FAQ</font></a><br /><br /> <center><font color="#ffffff"> Total Gangsters Online: <font color="#ffffff"><?php echo "$num"; ?></font><br /><br /> </div></td></tr> </table> </form> <!-- End ImageReady Slices --> </div> </body> </html> <html> <body> </body> </html> Thanks Tuss.
  2. Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/true-gangsters.mygamesonline.org/index.php on line 22 Warning: mysql_query(): A link to the server could not be established in /home/www/true-gangsters.mygamesonline.org/index.php on line 22 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/true-gangsters.mygamesonline.org/index.php on line 25 Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/www/true-gangsters.mygamesonline.org/index.php on line 26 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/true-gangsters.mygamesonline.org/index.php on line 65 Warning: mysql_query(): A link to the server could not be established in /home/www/true-gangsters.mygamesonline.org/index.php on line 65 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/true-gangsters.mygamesonline.org/index.php on line 65 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/true-gangsters.mygamesonline.org/index.php on line 66 Warning: mysql_query(): A link to the server could not be established in /home/www/true-gangsters.mygamesonline.org/index.php on line 66 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/true-gangsters.mygamesonline.org/index.php on line 66 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/true-gangsters.mygamesonline.org/index.php on line 67 Warning: mysql_query(): A link to the server could not be established in /home/www/true-gangsters.mygamesonline.org/index.php on line 67 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/true-gangsters.mygamesonline.org/index.php on line 67 Warning: mysql_query(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/true-gangsters.mygamesonline.org/index.php on line 68 Warning: mysql_query(): A link to the server could not be established in /home/www/true-gangsters.mygamesonline.org/index.php on line 68 Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /home/www/true-gangsters.mygamesonline.org/index.php on line 68 This is on the login page heres the coding. <?php session_start(); include_once"includes/db_connect.php"; if (strip_tags($_GET['logout']) == "yes"){ session_destroy(); }elseif (isset($_SESSION['username'])){ header("Location: logged_in.php"); exit(); } if ($_POST['Submit'] && strip_tags($_POST['username']) && strip_tags($_POST['password'])){ $username = addslashes(strip_tags($_POST['username'])); $password = addslashes(strip_tags($_POST['password'])); $ip = $REMOTE_ADDR; ///check INFO $sql = mysql_query("SELECT * FROM users WHERE username='$username' AND password='$password' AND activated='1' LIMIT 1"); $login_check = mysql_num_rows($sql); $inf = mysql_fetch_object($sql); if ($login_check == "0"){ $message="You could not be logged in"; }elseif ($login_check != "0"){ if ($login_check > "0"){ if ($inf->status == "Dead"){ include_once"dead.php"; exit(); } if ($inf->status == "Banned"){ $encoded=md5(strtolower($username)); header("Location: banned.php?banned=$username&encoded=$encoded"); exit(); } session_register('username'); $_SESSION['username'] = $inf->username; $timestamp = time()+60; mysql_query("UPDATE users SET online='$timestamp' WHERE username='$username'"); mysql_query("UPDATE users SET l_ip='$ip' WHERE username='$username'"); header("Location: logged_in.php"); } else { $message= "You could not be logged in.<br />"; }}} $total_regged=mysql_num_rows(mysql_query("SELECT * FROM users")); $admins=mysql_num_rows(mysql_query("SELECT * FROM users WHERE userlevel='2'")); $mods=mysql_num_rows(mysql_query("SELECT * FROM users WHERE userlevel='1'")); $iti=mysql_fetch_object(mysql_query("SELECT * FROM site_stats WHERE id='1'")); $most=$iti->online; ?> <link rel="stylesheet" href="includes/in.css" type="text/css"> <html> <style type="text/css"> body { font-family: Verdana; font-size: 10px; font-style: normal; font-weight: 500; font-variant: normal; color: #FFFFFF; background-color: #303030 ; } subtd2 { font-family: Verdana; font-size: 10px; font-style: normal; font-weight: 500; color: #000000; background-color: #666666; height: auto; width: auto; text-align: left; } maintd2 { font-family: Verdana; font-size: 10px; font-style: normal; font-weight: 500; color: #000000; background-color: #000000; background-position: center; height: auto; width: auto; text-align: center; } a:link { text-decoration: none; color: #33CCFF; font-weight: bold; } a:visited { text-decoration: none; color: #33CCFF; font-weight: bold; } a:active { text-decoration: none; color: #33CCFF; font-weight: bold; } a:hover { color: #FFFFFF; font-weight: bold; text-decoration: blink; }.warning { color: #FF0000; font-weight: bold; text-decoration: none; }.textbox { font-family: Verdana; font-size: 10px; color: #000000; background-color: #ffffff; border: none; } .table1px { border: 1px solid #000000; } .tabledbl { border: 2px double #FFFFFF; } .gradient { font-family: Verdana; font-size: 10px; font-style: normal; line-height: 30px; font-weight: bold; color: #FFFFFF; background-image: url(http://www.gangparadise.com/Images/tile_sub.gif); background-repeat: repeat-x; } .tableborder { font-family: Verdana; font-size: 10px; font-style: normal; line-height: normal; color: #FFFFFF; background-color: #000000; padding: 5px; } .tableborder2 { font-family: Verdana; font-size: 10px; font-style: normal; line-height: normal; color: #FFFFFF; background-color: #000000; background-image: url(includes/grad.gif); background-repeat: no-repeat; background-position: center top; padding: 5px; } .foot { border: 1px solid #000000; } </style> <head> <title>True Gangster:: Login Here!</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body background="http://i111.photobucket.com/albums/n152/cl_bullet/background.jpg" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <div align="center"> <form name="form1" method="post" action=""> <br> <table border="0" cellspacing="0" bordercolor="#000000"> <tr><td> <img src="tgi.jpg" width="999" height="98"></td> </tr> <tr><td><center><b><font color=#000000><b>Welcome, before you can officially enter True Gangster you will need to sign up by <a href=register.php><font color=red>registering</font></a>. If you are a returning member of True Gangster please login via the form below. <br> Enjoy playing the text-based mafia game please obey the rules suplied by the Admins <font color=orange>(Tuss)</font> or you will have to face the consequences.</b></font><br> </b> <br> </br> <br> </table> <table width="400" border="1" cellspacing="0" bordercolor="#000000" bgcolor="#00000" background='includes/grad.gif'> <center><tr> <br> <br> <td><center><b>Login To True Gangster</b></td> </tr> <tr> <td align="center" valign="top" bgcolor="#000000"><p class="style4"><br /> <font color=darkred size=5><b><center></center> </font></p> <p align="center" class="style4"><font color=darkred size=5><b></font><br /> Username: <input name="username" type="text" id="username" value="" size="30" maxlength="40" class="textbox"/> <br /> <br /> Password: <input name="password" type="password" id="password2" value="" size="30" maxlength="40"class="textbox" /> <br /> <br /> <input type="submit" name="Submit" value="Login" class="custombutton"/> </p> <a href=register.php><font color='1799ff'>Register</font></a> | <a href=lost.php><font color='1799ff'>Forgot Password</font></a> | <a href=faq.php><font color='1799ff'>FAQ</font></a><br /><br /> <center><font color="#ffffff"> Total Gangsters Online: <font color="#ffffff"><?php echo "$num"; ?></font><br /><br /> </div></td></tr> </table> </form> <!-- End ImageReady Slices --> </div> </body> </html> <html> <body> </body> </html>
  3. Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/true-gangsters.mygamesonline.org/includes/db_connect.php on line 6 Can't connect to the MySQL server. Please contact the webmaster. Thats what it comes up with when i go to my site. Heres the code :- <?php session_start(); ob_start(); $connect = mysql_connect("localhost:330*","122***_trueg","TussR"); if($connect == TRUE) { if(mysql_select_db("122716_trueg") != TRUE) { exit("<span style='color: red'>Can't connect to the MySQL database. Please contact the webmaster.</body></html>"); } }else{ exit("<span style='color: red'>Can't connect to the MySQL server. Please contact the webmaster.</body></html>"); } ?>
  4. Ive made a database . Here are a list of all my pages. airport Browse: (0 Rows) attempts Browse: (0 Rows) auctions Browse: (1 Rows) ban Browse: (0 Rows) bank Browse: (0 Rows) bank2 Browse: (0 Rows) bar Browse: (0 Rows) betlogs Browse: (0 Rows) bf Browse: (0 Rows) bidders Browse: (0 Rows) bj Browse: (0 Rows) blackjack Browse: (0 Rows) buisnesses Browse: (0 Rows) car_sell Browse: (0 Rows) casinos Browse: (0 Rows) chat Browse: (0 Rows) crews Browse: (0 Rows) dealership Browse: (0 Rows) donaters Browse: (0 Rows) enemies Browse: (0 Rows) friends Browse: (0 Rows) garage Browse: (0 Rows) get_away Browse: (0 Rows) hitlist Browse: (23 Rows) inbox Browse: (0 Rows) jail Browse: (0 Rows) kill_chart Browse: (10 Rows) log Browse: (0 Rows) lotto Browse: (0 Rows) lotto_info Browse: (0 Rows) married Browse: (0 Rows) matches Browse: (0 Rows) oc Browse: (0 Rows) ocinvites Browse: (0 Rows) paper Browse: (0 Rows) phpbb_auth_access Browse: (0 Rows) phpbb_banlist Browse: (1 Rows) phpbb_categories Browse: (68 Rows) phpbb_config Browse: (0 Rows) phpbb_confirm Browse: (0 Rows) phpbb_disallow Browse: (0 Rows) phpbb_forums Browse: (0 Rows) phpbb_forum_prune Browse: (2 Rows) phpbb_groups Browse: (1 Rows) phpbb_posts Browse: (1 Rows) phpbb_posts_text Browse: (0 Rows) phpbb_privmsgs Browse: (0 Rows) phpbb_privmsgs_text Browse: (1 Rows) phpbb_ranks Browse: (0 Rows) phpbb_search_results Browse: (12 Rows) phpbb_search_wordlist Browse: (13 Rows) phpbb_search_wordmatch Browse: (1 Rows) phpbb_sessions Browse: (1 Rows) phpbb_sessions_keys Browse: (42 Rows) phpbb_smilies Browse: (1 Rows) phpbb_themes Browse: (1 Rows) phpbb_themes_name Browse: (1 Rows) phpbb_topics Browse: (0 Rows) phpbb_topics_watch Browse: (2 Rows) phpbb_users Browse: (2 Rows) phpbb_user_group Browse: (0 Rows) phpbb_vote_desc Browse: (0 Rows) phpbb_vote_results Browse: (0 Rows) phpbb_vote_voters Browse: (0 Rows) phpbb_words Browse: (0 Rows) points Browse: (0 Rows) points2 Browse: (0 Rows) pointstransfers Browse: (0 Rows) polls Browse: (0 Rows) pts Browse: (0 Rows) race Browse: (0 Rows) replys Browse: (0 Rows) rest Browse: (0 Rows) safe Browse: (0 Rows) search Browse: (0 Rows) shop Browse: (0 Rows) site_stats Browse: (0 Rows) street Browse: (0 Rows) swiss Browse: (0 Rows) ticket Browse: (0 Rows) ticket2 Browse: (0 Rows) topics Browse: (0 Rows) to_do Browse: (0 Rows) transfers Browse: (0 Rows) turf Browse: (0 Rows) updates Browse: (13 Rows) user_info
  5. I dont know if ive made the database. What should be on it if i have?
  6. Password combination wheres that on the php?
  7. Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/****.mygamesonline.org/includes/db_connect.php on line 6 Can't connect to the MySQL server. Please contact the webmaster. Heres my code: <?php session_start(); ob_start(); $connect = mysql_connect("localhost:3306","****_*****","TussR"); if($connect == TRUE) { if(mysql_select_db("122716_trueg") != TRUE) { exit("<span style='color: red'>Can't connect to the MySQL database. Please contact the webmaster.</body></html>"); } }else{ exit("<span style='color: red'>Can't connect to the MySQL server. Please contact the webmaster.</body></html>"); } ?>
  8. Warning: mysql_connect(): Unknown MySQL server host 'fdb1.localhost.com' (1) in /home/www/***.mygamesonline.org/includes/db_connect.php on line 6 Can't connect to the MySQL server. Please contact the webmaster It comes up with that :S ^^
  9. Hi, When im trying to get on my website this is the page i come up with. Warning: mysql_connect(): Access denied for user 'User'@'My I.P' (using password: YES) in /home/www/Game name.org/includes/db_connect.php on line 6 Can't connect to the MySQL server. Please contact the webmaster. Ive hidden some private info on their. Heres the Coding of the db_connect.php page <?php session_start(); ob_start(); $connect = mysql_connect("fdb1.runhosting.com:****","user","TussR"); if($connect == TRUE) { if(mysql_select_db("122716_trueg") != TRUE) { exit("<span style='color: red'>Can't connect to the MySQL database. Please contact the webmaster.</body></html>"); } }else{ exit("<span style='color: red'>Can't connect to the MySQL server. Please contact the webmaster.</body></html>"); } ?> Can anybody help?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.