Thread: $_POST Problem
View Single Post
 
Old July 6th, 2004, 09:09 PM
ElizabethN ElizabethN is offline
Authorized User
 
Join Date: Apr 2004
Location: Cincinnati, OH, USA.
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think the difference though Christian is that you were trying to echo a value in an array, which you have to reference a bit differently than a plain old variable.

This works:
echo "My name is $name";

and so does this:
echo "My name is " . $name;

But this doesn't:
echo "My name is $_POST['name']";
because you are referencing a value in an array, as jason offered the link to the explanation. When referencing an array, you either need to use braces or separate the value out with .'s