Well, now PHP is being parsed, but I have a problem with variables: they are
not being automatically set by PHP.

I have created a very simple html form (copied from php.net)

index.html
-----------------------------------------------
<form action="action.php" method="post">
Your name: <input type="text" name="name">
You age: <input type="text" name="age">
<input type="submit">
</form>
-----------------------------------------------

action.php
-----------------------------------------------
Hi <?php echo $name; ?>.
You are <?php echo $age; ?> years old.
-----------------------------------------------

The result is (error messages activated):
----------------------------------------------------------------------------
------------
Hi
"Warning: Undefined variable: name in c:\apache
group\apache\htdocs\action.php on line 1"
You are
"Warning: Undefined variable: age in c:\apache
group\apache\htdocs\action.php on line 2"
years old.
----------------------------------------------------------------------------
------------

I added  <?php phpinfo(); ?> to action.php. The variables and their values
are there:

_POST["name"]   Laura
_POST["age"]      21

but, they are not recognized inside the PHP code.

:(

Laura


-- 
PHP Install Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to