.oO(JD)
Quote:
Basically I have a form which asks the user to select one of two possible
states for a variable, mypet. When the type of pet is selected, an new page
opens, which is supposed to show what type of pet was selected, ...but it
doesn't.
When the second page opens, the line:-
http://localhost/newland/animal_home_page.php?mypet=Cat does appear in the
URL bar, which looks to me like the variable is getting assigned. But only a
blank space appears in the page text where the animal name is supposed to
be. |
The code looks correct on first sight. Are you sure PHP is running
correctly? Create a file with only this line in it:
<?php phpinfo();?>
Name it phpinfo.php (or whatever), put it somewhere in your site
directory and call it in the browser:
http://localhost/phpinfo.php
If you get a blank page then there's something wrong with the server
configuration.
Another thing you could try - put these lines at the beginning of
animal_home_page.php (right after the body starts):
<pre>
<?php print_r($_GET);?>
</pre>
Micha