Please post the login code that sets the session variables.
<?php session_start(); if(isset($_SESSION['player'])) { session_destroy(); } ?> <html> <head> <title>Drug Money</title> </head> <body> <body bgcolor="#000" tex="#ffffff"> <table border="1" bgcolor="red"> <tr> <td> <form method="POST" action="login.php"> <center><b><font color="#ffffff">Username:<br> <center><input type="text" name="player" size="15"><br> <center>Password:<br> <center><input type="password" name="password" size="15" mask="x"><br> <center><input type="submit" value="submit" name="submit"><br><br> <center>Not registered? Please <A href='register.php'>Register</a><br><br> <center>Forgot password? <A href="getpass.php">Get Password</a><br><br> </td></b></font></form> </html>
anyone help me pls
tsinka said:
Show the index.php which from looking at what you have posted is where the $_SESSION variables are set.
thats my whole index and menu do u want login.php?
do u ?
man anyone gonna help me
I don't see where you set session['username'] to yes and if you have the login on the same page as the other code you posted, your killing the session so all var are erased so you'll never see it set to true.
And you'll note that I deleted your posts where you just say things like
deu wrote:anyone help me pls
every hour or so. They're just rude. Other people don't exist just to fix your problems. Give them time to deal with their own lives first.
ok srry bout that
<html> <head> <title>Drug Money :: Login Susccessfully/Login incorect</title> </head> <body> <body bgcolor="#000" text="#ffffff"> <?php include "connect.php"; if (isset($_POST['submit'])) // name of submit button { $player=$_POST['player']; $password=$_POST['password']; $player=strip_tags($player); $password=md5($password); $query = "select * from km_users where playername='$player' and password='$password' and validated='1'"; $result = mysql_query($query) or die("No te Gusta") ; $result2=mysql_fetch_array($result); if($result2) { $_SESSION['player']=$player; print "logged in successfully<br><br>"; print "<A href='menu.php'>Go to Pimp Panel</a>"; } else { print "Wrong username or password or non-activated account."; } } ?> </body> </html>
Where u set the session:
$_SESSION['player']=$player;
set the session with the username yes
$_SESSION['username']='yes';