Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Display Modes
  #1 (permalink)  
Old May 2nd, 2005, 08:28 AM
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>
  #2 (permalink)  
Old May 6th, 2005, 03:53 PM
Friend of Wrox
Points: 1,515, Level: 15
Points: 1,515, Level: 15 Points: 1,515, Level: 15 Points: 1,515, Level: 15
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2003
Location: Oxford, , United Kingdom.
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
  #3 (permalink)  
Old May 10th, 2005, 03:17 AM
Registered User
 
Join Date: Apr 2005
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

its running well

without any problem

 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 06:48 PM
browser crmpicco HTML Code Clinic 6 July 20th, 2005 06:20 AM



All times are GMT -4. The time now is 10:09 PM.


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