Wrox Programmer Forums
|
BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1
This is the forum to discuss the Wrox book Professional PHP5 by Ed Lecky-Thompson, Heow Eide-Goodman, Steven D. Nowicki, Alec Cove; ISBN: 9780764572821
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 2nd, 2005, 07:28 AM
Registered User
 
Join Date: Apr 2005
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>
 
Old May 6th, 2005, 02:53 PM
Friend of Wrox
 
Join Date: Dec 2003
Posts: 488
Thanks: 0
Thanked 3 Times in 3 Posts
Default

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
 
Old May 10th, 2005, 02:17 AM
Registered User
 
Join Date: Apr 2005
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

its running well

without any problem






Similar Threads
Thread Thread Starter Forum Replies Last Post
browser name annaski PHP How-To 1 February 21st, 2008 06:38 AM
Browser Settings... arjun_a ASP.NET 2.0 Basics 1 December 26th, 2006 03:00 AM
Launch default browser in a new browser window haiying Beginning VB 6 1 August 30th, 2005 05:48 PM
browser crmpicco HTML Code Clinic 6 July 20th, 2005 05:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.