p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 (http://p2p.wrox.com/forumdisplay.php?f=152)
-   -   not getting o/p on browser (http://p2p.wrox.com/showthread.php?t=28814)

ajit_kunte May 2nd, 2005 07:28 AM

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>

ciderpunx May 6th, 2005 02:53 PM

what do you see if you run it from the commandline?

i.e.
$ php your_file.php

--
Don't Stand on your head - you'll get footprints in your hair
                                           http://charlieharvey.org.uk
                                              http://charlieharvey.com

ajit_kunte May 10th, 2005 02:17 AM

its running well

without any problem



All times are GMT -4. The time now is 05:48 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.