AdY.Capone Posted May 10, 2016 Report Share Posted May 10, 2016 De cateva zile ma tot chinui sa rezolv login.php Nu merge sa ma loghez.. id sau pass incorecte. Am pus exact ca din database.. tabel users de unde sa extraga, name si password exact ca in database.. si nimic. <?php include 'includes/config.php'; if(isset($_POST['username']) && isset($_POST['password'])){ $username = sec($_POST['username']); $password = $_POST['password']; $check = get_row("SELECT ID FROM users WHERE name='$username' && password='$password'"); if(isset($check['id'])){ $banned = get_row("SELECT * FROM bans WHERE name='$username'"); if(isset($banned['id'])){ if($banned['BanaP'] == 0){ $err = 'EÅŸti banat permanent.'; }else{ $err = 'EÅŸti banat până la data de '.$banned['BanzP'].'.'.$banned['BanlP'].'.'.$banned['BanaP'].' '.$banned['BanoP'].':'.$banned['BanmP']; } }else{ $_SESSION['username'] = $_POST['username']; $_SESSION['password'] = $password; mysql_query("UPDATE users SET rpgon=2 WHERE Name='$username'"); header('location: index.php'); } }else{ $err = 'Numele de utilizator ori parola incorecte.'; } } include 'includes/header.php'; ?> <div class="main-content"> <div class="breadcrumbs" id="breadcrumbs"> <script type="text/javascript"> try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){} </script> <ul class="breadcrumb"> <li> <i class="icon-home home-icon"></i> <a href="index">Acasă</a> </li> <li class="active"><i class="icon-angle-right"></i> Conectare </li> </ul> <div class="nav-search" id="nav-search"> <form method="POST" action="searchplayer"> <span class="input-icon"> <input type="text" placeholder="Caută jucător ..." name="username" id="username" type="submit" class="nav-search-input" autocomplete="on"> <i class="icon-search nav-search-icon"></i> </span> </form> </div> </div> <div class="page-content"> <div class="row-fluid"> <div class="span12"> <center> <form method="POST" action="login.php"> <?php if(isset($err)): ?> <center><div class="alert alert-danger"><?=$err?></div></center> <?php endif; ?> <h2>Panou Utilizator RPG Respect-Gaming</h2> Nume de utilizator:<br /> <input type="text" id="username" name="username" /><br /> Parola:<br /> <input id="password" type="password" name="password" /><br /> <br /> <input class="btn btn-inverse btn-large" type="submit" value="Conectare"><br /><br /> <br> <br> <div class="hr hr8 hr"></div> <br> (©) Respect-Gaming 2014 - Toate Drepturile Rezervate </form> </center> </div><!-- this div closes span12--> </div><!-- this div close row fluid --> </div><!-- this div close page content--> </div><!-- this div close main content--> Nu am parolele criptate. Quote Link to comment Share on other sites More sharing options...
WopsS Posted May 10, 2016 Report Share Posted May 10, 2016 Fai un print_r lui $check si vezi ce are in el. Quote Link to comment Share on other sites More sharing options...
AdY.Capone Posted May 10, 2016 Author Report Share Posted May 10, 2016 scriu print_r dupa $check ? Quote Link to comment Share on other sites More sharing options...
Daedric-Fox Posted May 11, 2016 Report Share Posted May 11, 2016 9 hours ago, AdY.Capone said: scriu print_r dupa $check ? Știi să folosești fu ctia print_r? Pui sub check ala print_r($check); Quote ********************************** Servicii Scripting de calitate: ********************************* Future Project: ExpertGame ********************************* Link to comment Share on other sites More sharing options...
AdY.Capone Posted May 11, 2016 Author Report Share Posted May 11, 2016 Array ( [0] => 1 [id] => 1 ) Unknown column 'name' in 'where clause' Ei bine unknown column name imi aparea mai mereu. Exact asa apare in baza de date(users) name nu Name sau altceva Quote Link to comment Share on other sites More sharing options...
WopsS Posted May 11, 2016 Report Share Posted May 11, 2016 5 hours ago, AdY.Capone said: Array ( [0] => 1 [id] => 1 ) Unknown column 'name' in 'where clause' Ei bine unknown column name imi aparea mai mereu. Exact asa apare in baza de date(users) name nu Name sau altceva Scrie SELECT * FROM users in loc de SELECT ID FROM users ce de dupa lasi la fel. Quote Link to comment Share on other sites More sharing options...
AdY.Capone Posted May 11, 2016 Author Report Share Posted May 11, 2016 Unknown column 'name' in 'where clause' tot la fel primesc.. Unknown column 'name' in 'where clause' tot la fel primesc.. Quote Link to comment Share on other sites More sharing options...
BuNiCu-RP Posted May 13, 2016 Report Share Posted May 13, 2016 (edited) <?php include 'includes/config.php'; if(isset($_POST['username']) && isset($_POST['password'])){ $username = sec($_POST['username']); $password = $_POST['password']; $check = get_row("SELECT * FROM `users` WHERE `name`='".$username."' AND `password`='".$password."'"); if(isset($check['id'])){ $banned = get_row("SELECT * FROM `bans` WHERE `name`='". $username ."'"); if(isset($banned['id'])){ if($banned['BanaP'] == 0){ $err = 'EÅŸti banat permanent.'; }else{ $err = 'EÅŸti banat până la data de '.$banned['BanzP'].'.'.$banned['BanlP'].'.'.$banned['BanaP'].' '.$banned['BanoP'].':'.$banned['BanmP']; } }else{ $_SESSION['username'] = $_POST['username']; $_SESSION['password'] = $password; mysql_query("UPDATE `users` SET `rpgon`=2 WHERE `name`='".$username."'"); header('location: index.php'); } }else{ $err = 'Numele de utilizator ori parola incorecte.'; } } include 'includes/header.php'; ?> <div class="main-content"> <div class="breadcrumbs" id="breadcrumbs"> <script type="text/javascript"> try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){} </script> <ul class="breadcrumb"> <li> <i class="icon-home home-icon"></i> <a href="index">Acasă</a> </li> <li class="active"><i class="icon-angle-right"></i> Conectare </li> </ul> <div class="nav-search" id="nav-search"> <form method="POST" action="searchplayer"> <span class="input-icon"> <input type="text" placeholder="Caută jucător ..." name="username" id="username" type="submit" class="nav-search-input" autocomplete="on"> <i class="icon-search nav-search-icon"></i> </span> </form> </div> </div> <div class="page-content"> <div class="row-fluid"> <div class="span12"> <center> <form method="POST" action="login.php"> <?php if(isset($err)): ?> <center><div class="alert alert-danger"><? echo $err; ?></div></center> <?php endif; ?> <h2>Panou Utilizator RPG Respect-Gaming</h2> Nume de utilizator:<br /> <input type="text" id="username" name="username" /><br /> Parola:<br /> <input id="password" type="password" name="password" /><br /> <br /> <input class="btn btn-inverse btn-large" type="submit" value="Conectare"><br /><br /> <br> <br> <div class="hr hr8 hr"></div> <br> (©) Respect-Gaming 2014 - Toate Drepturile Rezervate </form> </center> </div><!-- this div closes span12--> </div><!-- this div close row fluid --> </div><!-- this div close page content--> </div><!-- this div close main content--> Asa ar trebui sa functioneze perfect ! Edited May 13, 2016 by SSYT Quote Link to comment Share on other sites More sharing options...
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.