Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 15th, 2003, 01:36 PM
Registered User
 
Join Date: Jul 2003
Location: , , .
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>
Reply With Quote
  #2 (permalink)  
Old July 15th, 2003, 01:46 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Wien, Wien, Austria.
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
Reply With Quote
  #3 (permalink)  
Old July 15th, 2003, 02:07 PM
Registered User
 
Join Date: Jul 2003
Location: , , .
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.

Reply With Quote
  #4 (permalink)  
Old July 15th, 2003, 02:17 PM
Registered User
 
Join Date: Jul 2003
Location: , , .
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 :/
Reply With Quote
  #5 (permalink)  
Old August 21st, 2003, 03:04 PM
Authorized User
 
Join Date: Jun 2003
Location: Indianapolis, IN, USA.
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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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




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


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