HighDots Forums  

Re: Newbie PHP Variable Question

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Re: Newbie PHP Variable Question in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michael Fesser
 
Posts: n/a

Default Re: Newbie PHP Variable Question - 06-11-2004 , 11:50 AM






.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


Reply With Quote
Reply




Thread Tools
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.