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 August 30th, 2004, 04:46 PM
SW1 SW1 is offline
Registered User
 
Join Date: Aug 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help with perceived error in chapter 5

I am attemtping to run the captitals.php and states.php code from chapter 5.

I am running on a server with register_globals off. When I execute the states.php program I see a page with the following data:

The State capital is MontgomeryThe State capital is JuneauThe State capital is PhoenixThe State capital is Little RockThe State capital is SacramentoThe State capital is DenverThe State capital is HartfordThe State capital is DoverThe State capital is TallahasseThe State capital is AtlantaThe State capital is HonoluluThe State capital is BoiseThe State capital is SpringfieldThe State capital is IndianapolisThe State capital is Des MoinesThe State capital is TopekaThe State capital is FrankfortThe State capital is Baton RougeThe State capital is AugustaThe State capital is AnnapolisThe State capital is BostonThe State capital is LansingThe State capital is Saint PaulThe State capital is JacksonThe State capital is Jefferson CityThe State capital is HelenaThe State capital is LincolnThe State capital is Carson CityThe State capital is ConcordThe State capital is TrentonThe State capital is Santa FeThe State capital is AlbanyThe State capital is RaleighThe State capital is BismarckThe State capital is ColumbusThe State capital is Oklahoma CityThe State capital is SalemThe State capital is HarrisburgThe State capital is ProvidenceThe State capital is ColumbiaThe State capital is PierreThe State capital is NashvilleThe State capital is AustinThe State capital is Salt Lake CityThe State capital is MontpelierThe State capital is RichmondThe State capital is OlympiaThe State capital is CharlestonThe State capital is MadisonThe State capital is Cheyenne

If I add the following code above the headers on capitals.php:
<?php
  //create short variable names
  $State=$HTTP_POST_VARS['State'];
?>

I end up with a blank page. I have tried this two ways, hand-typing the code from the book and using the two files from the Download.

You can see the script in action at this location

I would appreciate any advice.

SW






Similar Threads
Thread Thread Starter Forum Replies Last Post
error with chapter 7 jdz66 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 August 21st, 2006 05:19 PM
Parse error in error handler (Chapter 8) Funky Monk BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 August 6th, 2004 08:59 AM





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