View Single Post
  #1 (permalink)  
Old May 2nd, 2005, 07:28 AM
ajit_kunte ajit_kunte is offline
Registered User
 
Join Date: Apr 2005
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default not getting o/p on browser

hello i have simple code for login

its not showing any err. on Linux but not showing o/p also

can anybody help??

tx in advance hear is code


if (isset($_POST['submit']))
{

$id=$_POST['loginid'];
$passw=$_POST['password'];


if(isset($id) and isset($passw))
{
$link = mysql_connect("localhost", "team", "leader")
or die ("Could not connect to MySQL");

    mysql_select_db ("dba")
    or die ("Could not select database");

        $result=mysql_query("SELECT * FROM LoginId where loginid='".$id."' And password='".$passw."';")
    or die ("Query failed");

                 if(mysql_num_rows($result))
                 {

                 header("Location: http://.../~ajit/displayinfo.php");
                 //<meta http-equiv="http://.../~ajit/displayinfo.php">

                 }
                 else
                 {
                 echo "you have entered wrong loginid and/or password!
                     please try again";
                 disp_frontpage();
                 }


}
else
{
echo "loginid and password are mandatory fields ";
disp_frontpage();

}
}
else {
echo"enter loginid and password and click SUBMIT BUTTON";
}

//print(disp_frontpage());




function disp_frontpage()
{
?>

<html>
<body>
<tital></tital>

<form> method="post" action="<?php $_SERVER['PHP_SELF']?>"
<table>
<tr><td><input type="text" name="loginid" value=""></td></tr><br>
<tr><td><input type="text" name="password" value=""</td></tr><br>
<tr><td><input type="submit" name="submit" value="submit"></td></tr><br>
</table>
</form>
</body>
</html>
<?php
}
?>


<html>
<body>
<tital></tital>

<form> method="post" action="<?php $_SERVER['PHP_SELF'];?>"
<table>
<tr><td><input type="text" name="loginid" value=""></td></tr><br>
<tr><td><input type="text" name="password" value=""</td></tr><br>
<tr><td><input type="submit" name="submit" value="submit"></td></tr><br>
</table>
</form>
</body>
</html>