Ok, I should have read php.ini information. The first paragraph notifies:

"...Instead of using $foo, you must use $_REQUEST["foo"]..."

Now itīs working. Thanks!


----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Laura Silveira Mastella" <[EMAIL PROTECTED]>
Sent: Friday, February 01, 2002 9:59 AM
Subject: Re: [PHP-INST] problem with form variables


>
> this can probably be fixed in your php.ini.  to test whether this is true
> or not, try to grab the varaiblas as HTTP_POST_VARS['name'] and
> HTTP_POST_VARS['age'].  if php recognized the variables that way all can
be
> fixed in the ini.  I thought as of 4.06 it was installed that way be
> default, but i guess not.  Unfortuantely i forget the setting....
>
> Hope this helps.
> Jeff
>
>
>
>                       "Laura Silveira
>                       Mastella"                To:
<[EMAIL PROTECTED]>
>                       <[EMAIL PROTECTED]        cc:
>                       gs.br>                   Subject:  [PHP-INST]
problem with form variables
>
>                       02/01/2002 09:27
>                       AM
>
>
>
>
>
>
> 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]
>
>
>


-- 
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