By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,530 Members | 891 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,530 IT Pros & Developers. It's quick & easy.

signout code corrections please

P: 3
<?
session_start();
$username=$_POST['euid'];
$password=$_POST['epwd'];
mysql_connect ("localhost", "root", "sunkalpid") or die ('My SQL Error: ' . mysql_error());
mysql_select_db ("appzsolute");
$stuff = mysql_query("SELECT * FROM `employee_login` WHERE username='".$username."' AND password='".$password."'") or die("MySQL Login Error: ".mysql_error());
if (mysql_num_rows($stuff) > 0) {
$row=mysql_num_rows($stuff);
echo("<script language='javascript'>alert('You are logged in as $username!');</script>");
include "employee_login_display.php";
}
else{
echo("<script language='javascript'>alert('Login Incorrect. Please Try Again!');</script>");
include "employee_login.html";
}
?>

this is my actual code here when we go to next page and if we refresh then iam able to see user id and password this is my problem plz give me a solution
Dec 21 '07 #1
Share this Question
Share on Google+
1 Reply


Ranjan kumar Barik
P: 95
<?
session_start();
$username=$_POST['euid'];
$password=$_POST['epwd'];
mysql_connect ("localhost", "root", "sunkalpid") or die ('My SQL Error: ' . mysql_error());
mysql_select_db ("appzsolute");
$stuff = mysql_query("SELECT * FROM `employee_login` WHERE username='".$username."' AND password='".$password."'") or die("MySQL Login Error: ".mysql_error());
if (mysql_num_rows($stuff) > 0) {
$row=mysql_num_rows($stuff);
echo("<script language='javascript'>alert('You are logged in as $username!');</script>");
include "employee_login_display.php";
}
else{
echo("<script language='javascript'>alert('Login Incorrect. Please Try Again!');</script>");
include "employee_login.html";
}
?>

this is my actual code here when we go to next page and if we refresh then iam able to see user id and password this is my problem plz give me a solution
Hi,
Could you please explain what is actually your problem.
Your code is working fine.
I mean what goes wrong with this code.

Thanks!
:)
Dec 21 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.