$http_post_vars Help

okay, i have a form hat has a text field called name and i use post. now it goes to my next page with

&name=thenamesupplied

my script on the page it went to has this,

print $HTTP_POST VARS[“name”];

and it prints thenamesupplied, it works

thats good, now i noticed when i go directly to that page, and i dont have any arrays in the url, it just prints a blank space. it tired putting in this code that, if it couldnt find the name field in the url it would redirect to this page, and if it did find the name field in the url, it would print it, there is the code i tried

if ($HTTP_POST_VARS[“name”] = null) {
header( “Location: index.php?error=101” );
} else {
print $HTTP_POST_VARS[“name”];
}

if it cant find the name field and value it goes to

index.php?error=101

if it finds the name filed, it prints the value. the only problem is the code dosent work. could you give me the code that does:(

<?
if (is_null($_POST['name']) == TRUE) {
header("Location: http://www.kirupaforum.com/");
}
print $name; 
?>

Notice that you can’t assign strings (ie: phpfile.php?name=13123) when using POST, if you want to test the script using strings, change $_POST into $_GET.

[edit] By the way, i don’t think that you can use else statements to print, am sure of that. :-\ [/edit]