my story :
I created table is called members in data base DB5 with 3 fields
1-ID
2-username
3-password
filed with: 1 john 1234
----------then-----
in html
my input name=myusername
my input name =mypassword
method="POST" action="checklogin.php"
------then-----
checklogin.php
<?php
$var = '';
include('conn.php');
$myusername=$post['myusername'];
$mypassword=$post['mypassword'];
$sql="select * from $tbl_name where 'username'='$myusername' and 'password'='$mypassword'";
$result=mysql_query($sql);
$count=mysql_num_rows($result);
if ($count==1) {
session_register("myusername");
session_register("mypassword");
header("location:inboxtitle.php");
}
else {
echo "wrong user name or password ";
}
?>
---------then --------
inboxtitle.php
<?
session_start();
if (!session_is_registered(username)){
header ("location:index.php"); /// means if not registered will backto index
}
?>
<html>
<head>
<meta
........
when ever I open html form and enter exist username and password and press submit the screen will print wrong user name or password
how can I make it move to titleinbox.php ?
any idea what is wrong in this processes ?