Jump to content

Unable to Validate the login information


Jinidoc

Recommended Posts

File name:loginch.php

 

<?
include ("session.php");
include ("Connection.php");
?>
<!doctype html public "-//w3c//dtd html 3.2//en">

<html>

<head>
<title>(Welcome)</title>
<meta name="GENERATOR" content="Arachnophilia 4.0">
<meta name="FORMATTER" content="Arachnophilia 4.0">
</head>

<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#ff0000">

<?
$usr = $_POST['userid'];
$pass = $_POST['password'];

$usr=mysql_real_escape_string($usr);
$pass=mysql_real_escape_string($pass);

if($rec=mysql_fetch_array(mysql_query("SELECT * FROM signup WHERE userid='$usr' AND password = '$pass'"))){
   if(($rec['userid']==$usr)&&($rec['password']==$pass)){
    include ("newsession.php");
   
            echo "<p class=data> <center>Successfully,Logged in<br><br><a href='logout.php'> Log OUT </a><br><br><a href=welcome.php>Click here if your browser is not redirecting automatically or you don't want to wait.</a><br></center>";
     print "<script>";
       print " self.location='welcome.php';"; // Comment this line if you don't want to redirect
          print "</script>";

            } 
      }   
   else {

      session_unset();
echo "<font face='Verdana' size='2' color=red>Wrong Login. Use your correct  Userid and Password and Try <br><center><input type='button' value='Retry' onClick='history.go(-1)'></center>";
      
   }
?>


</body>

</html>

File Name:Front.htm

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Home Page</title>
<style type="text/css">
#dropDownMenu ul {
   padding: 5px;
   margin: 0px;
   text-decoration: none;
   list-style-type: none;
}
#dropDownMenu ul li {
   display: inline;
   width: 100px;
   float: left;
   text-transform: uppercase;
   font-size: large;
   padding: 0px 20px 0px 0px;
}


#dropDownMenu ul li a {
   color: #666666;
   text-decoration: none;
   line-height: 15px;
   font-size: medium;
}
#dropDownMenu ul li ul {
   visibility: hidden;
}
#dropDownMenu ul li ul li a {
   font-size: 0.70em;
   text-transform: uppercase;
}
.style1 {
   text-align: left;
}
.style2 {
   text-align: center;
}
.style3 {
   margin-left: 0px;
}
#apDiv1 {
   position:absolute;
   width:723px;
   height:93px;
   z-index:3;
   left: 124px;
   top: -11px;
}
body {
   background-color: #69F;
}
#apDiv2 {
   position:absolute;
   width:416px;
   height:182px;
   z-index:3;
   left: 314px;
   top: 318px;
}
</style>
</head>

<body>

<div style="position: absolute; width: 929px; height: 564px; z-index: 2; left: 158px; top: 36px" id="layer1">
  <div style="position: absolute; width: 193px; height: 90px; z-index: 4; left: 626px; top: 135px; bottom: 579px" id="layer3">
      <img src="th_ibm-logo.gif" width="219" height="88" /></div>
   <div style="position: absolute; width: 711px; height: 178px; z-index: 3; left: 100px; top: 79px" id="layer2"><img src="top_banner_corporate2.gif" width="769" height="203" class="style3" /></div>
  <div class="style2" id="apDiv1"> 
    <h1><em>WELCOME TO AZ GLOBALCTS</em></h1>
  </div>
  <div id="apDiv2">
    <form action='loginck.php' method=post>
    <table border='0' align=center cellpadding='0' cellspacing='0'>
    <tr id='cat'>
  <tr> <td bgcolor='#f1f1f1' ><font face='verdana, arial, helvetica' size='2' align='center'>   Login ID     
</font></td> <td bgcolor='#f1f1f1' align='center'><font face='verdana, arial, helvetica' size='2' >
<input type ='text' class='bginput' name='userid' ></font></td></tr>

<tr> <td bgcolor='#ffffff' ><font face='verdana, arial, helvetica' size='2' align='center'>   Password  
</font></td> <td bgcolor='#ffffff' align='center'><font face='verdana, arial, helvetica' size='2' >
<input type ='text' class='bginput' name='password' ></font></td></tr>

<tr> <td bgcolor='#f1f1f1' colspan='2' align='center'><font face='verdana, arial, helvetica' size='2' align='center'>  
<input type='submit' value='Submit'> <input type='reset' value='Reset'>
</font></td> </tr>


<tr> <td bgcolor='#ffffff' ><font face='verdana, arial, helvetica' size='2' align='center'>  <a href='signup.php'>New Member Sign UP</a></font></td> <td bgcolor='#ffffff' align='center'><font face='verdana, arial, helvetica' size='2' ><a href=forgot-password.php>
Forgot Password</a> ?</font></td></tr>

<tr> <td bgcolor='#f1f1f1' colspan='2' align='center'><font face='verdana, arial, helvetica' size='2' align='center'>   
</font></td> </tr>


</table> 
  </center>
    </form>
  </div>
</div>

</body>

</html>

 

Error:

 

Successfully,Logged in

 

Log OUT

 

Click here if your browser is not redirecting automatically or you don't want to wait.

"; print ""; } } else { session_unset(); echo "Wrong Login. Use your correct Userid and Password and Try

"; } ?>

 

 

Please help

 

Thanks in advanced

 

Second request: Please use

 . . . 

BBCode tags when posting code. I put them in for you again so it would be readable, and maybe someone will be able to help.

 

Now, do you have a question to go along with that code?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.