perfectly_dark
06-13-2003, 11:11 PM
I just got PHP and Apache set up. It all works fine except for one thing. I'm trying to use a form to send data to another page and have that page process it. This has worked on another server so it's not the code. All the other PHP works, phpinfo() and all other PHP functions work just fine, however, I pass a variable using the forms using both POST and GET (The variable shows up in the address) but the variable in the next page is empty. Here's the source I'm using if it helps:
Entry Page:
<form action="test2.php" method=post>
My name is:
<br> <input type="text" name="YourName">
<p> My favorite dirty word is:
<br> <input type="text" name="FavoriteWord">
<p>
<input type="submit" name="submit" value="Enter My Data!">
</form>
Process Page:
Hi <?php print $YourName; ?>
<p>
You like the word <b> <?php print $FavoriteWord; ?> !?! </b>
<p>You oughta be ashamed of yourself!
This is just wrapped in the standard HTML code. Is there something I'm missing or is PHP not configured properly?
Entry Page:
<form action="test2.php" method=post>
My name is:
<br> <input type="text" name="YourName">
<p> My favorite dirty word is:
<br> <input type="text" name="FavoriteWord">
<p>
<input type="submit" name="submit" value="Enter My Data!">
</form>
Process Page:
Hi <?php print $YourName; ?>
<p>
You like the word <b> <?php print $FavoriteWord; ?> !?! </b>
<p>You oughta be ashamed of yourself!
This is just wrapped in the standard HTML code. Is there something I'm missing or is PHP not configured properly?