i am making a login page for my website.
here is the code:
<?php
include='dbconnect.php';
$tbl_name="members";
$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword'];
$myusername = stripslashes($myusername);
$mypassword = stripslashes($mypassword);
$myusername = mysql_real_escape_string($myusername);
$mypassword = mysql_real_escape_string($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:memberpage.php");
}
else {
echo "Wrong Username or Password";
}
?>
I DO NOT GET AN ERROR BUT nothing COMES UP.....please help!