To further clarify the $$names mystery...
When you use this code:
foreach($HTTP_POST_VARS as $name => $value) {
$$name = $value;
}
... what it does is take the value in $name in each loop, add a $ to it to make a variable, and assign the value in $value to that variable. Clear as mud?
Let's say the first item in the $HTTP_POST_VARS array is "username", and that name is "BuzzLY". The foreach loop assigns $name = "username" and $value = "BuzzLY". The very next line assigns $username = "BuzzLY", which is what we want to happen, right?
That is why there are is $$ in that line, and why it is NOT the line causing the error.
In the future, please do not post so much code on one line inside your
tags. Anything inside [code=php] or [code] tags will NOT wrap properly- you need to wrap them yourself so it doesn't stretch out the page.