php oturum kullanarak giriş

0 Cevap php
<?php
ob_start();
include("db_connect.php");
$tbl_name='login';
$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword'];
// To protect MySQL injection (more detail about MySQL injection)
$myusername = stripslashes($myusername);
$mypassword = stripslashes($mypassword);
 $myusername = mysql_real_escape_string($myusername);
$mypassword = mysql_real_escape_string($mypassword);
$encrypted_mypassword = crypt($mypassword,'ctk'); 

 $sql="SELECT * FROM $tbl_name WHERE u_name='$myusername' and password='$encrypted_mypassword'";
$result=mysql_query($sql);
// Mysql_num_row is counting table row
$count=mysql_num_rows($result);
// If result matched $myusername and $mypassword, table row must be 1 row
if($count==1){
session_register("myusername");
session_register("encrypted_mypassword");
header("location:edit-grid.php");
}
else {header("location:main_login.php?a=Login Failed Try Again!!");
//echo "Wrong Username or Password";
}
ob_end_flush();
?>

i have a login page shown above, in localhost it works fine,but shows an error in firebug: Failed to load source for: http://localhost/emp_tracker/main/checklogin.php

Sunucuda o onu yeniden doğrudan o (oturumu başarısız) başarısız değil barındırılan olduğunu,

0 Cevap