View Single Post
  #11 (permalink)  
Old December 19th, 2003, 01:45 PM
nikolai nikolai is offline
Friend of Wrox
Points: 2,570, Level: 21
Points: 2,570, Level: 21 Points: 2,570, Level: 21 Points: 2,570, Level: 21
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: San Diego, CA, USA
Posts: 836
Thanks: 0
Thanked 0 Times in 0 Posts
Default


First of all, $_POST is not a command, it's a variable, just like $choice is. That said, you should be able to do anything with $_POST['...'] as you can with $choice.

Second, 'choice1' is the index into the $_POST array. If you add <br> to that string, you're attempting to access a comletely different index. By index here, I mean that $_POST is a structure that allows you to associate a value with a name. The name of your values are 'choice1', 'choice2', and 'choice3'. There are no values named 'choice1<br>', which is why you get nothing.


Simple answer:

echo $_POST['choice1'] . "<br>";

   OR

echo "$_POST[choice1]<br>";

  OR (as I prefer:)

echo "{$_POST['choice1']}<br>";


For more info on variable substitution and string parsing, read the manual:
  http://www.php.net/types.string



Take care,

Nik
http://www.bigaction.org/
Reply With Quote