Wrox Programmer Forums
|
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5
This is the forum to discuss the Wrox book Beginning PHP4 by Wankyu Choi, Allan Kent, Chris Lea, Ganesh Prasad, Chris Ullman; ISBN: 9780764543647
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 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 July 15th, 2003, 01:36 PM
Registered User
 
Join Date: Jul 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default HELP?

I have just started with this book and
something is strange here. In chapter 3
page 76 / 79 Get is explained there.
If I input an author and i press Submit Query
I go to text.php. In the adressline I see this
file:\\\e:\cwindows\desktop\text.php?author=megumi +hayashibara,
but the page is totally blank.

If I use POST instead of GET then I will get an output.
Can someone please help me?

this is the source from text.html:
<html>
<head>
<title>Forms</title>
</head>
<body>
<form METHOD=GET action="text.php">
Who is your favourite singer?
<input Name="singer" type="Text">
<br>
<br>
<input type=submit>
</form>
</body>
</html>

and this is from text.php:
<html>
<head></head>
<body>
Your favorite Singer is:
<?php
echo $singer;
?>
<p>
Answer again right <a href="text.html">here</a>
</body>
</html>
 
Old July 15th, 2003, 01:46 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 158
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to NotNowJohn
Default

Add this line before echo $singer;
$singer=$_GET['singer'];
That line guarantee that variable $singer contains the value from the query string's part named "signer".

...but the Soon is eclipsed by the Moon
 
Old July 15th, 2003, 02:07 PM
Registered User
 
Join Date: Jul 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i doesn't work....it's the page that's blank not only singer, the page display
nothing....not even "Your favorite Singer is:" i just get a blank page.

 
Old July 15th, 2003, 02:17 PM
Registered User
 
Join Date: Jul 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

text.html
http://phplessons.t35.com:8000/image/html_text.jpg

This is text.php when text.html use "Method=Get
http://phplessons.t35.com:8000/image/php_get.jpg

This one is with "Method=Post"
http://phplessons.t35.com:8000/image/php_post.jpg

keep renewing if it doesn't work. T35 is a little weird :/
 
Old August 21st, 2003, 03:04 PM
Authorized User
 
Join Date: Jun 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

Please go through the installation detail of IIS given in the first chapter.
Install it properly and run the code again in http://localhost/.

It will work even with GET.

Jennifer D. Taylor
Wiley Technical Support









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