Hi,
I'm new to PHP and I'm trying an example from a book. This example is a small application that takes the output from a form and generates an e-mail message containing the form's contents. This is called Ex5.html :
$message .= "n";
$message .= "More Information ------------------n");
$message .= "The user's IP address is";
$message .= getenv("remote_addr").".n";
$message .= "The user is running the web browser ";
$message .= getenv("http_user_agent").".n";
?>
to invoke this I go to the html file with
my browser I fill out the form and submit.
then I get the following error messages :
Warning: Variable passed to each() is not an array or object in
/home/httpd/html/tests/example_5.php3 on line 5
------------------------------------
Warning: Unexpected character in input: '' (ASCII=92) state=1 in
/home/httpd/html/tests/example_5.php3 on line 6
-------------------------------------
Parse error: parse error, expecting `')'' in /home/httpd/html/sheilabel/tests/example_5.php3 on line 7
------------
>>> Does anyone have any idea how to fix this ? Some how it is not recognizing $HTTP_POST_VARS as an array but why I don't know.
>>> Please help. Thanx
hi i'm a newbie, but
it looks like this is what's wrong on line 6$message .= "More Information ------------------n");
remove the ) before ;
and i think the problem is solved http://www.devshed.com/Talk/Forums/smile.gif