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