My guess is that your register_globals config option is off:

        http://php.he.net/manual/en/configuration.php#ini.register-globals

(I believe that recent versions of PHP have it off by default). You 
should be able to access the values you want via

        $HTTP_POST_VARS['name']
and
        $HTTP_POST_VARS['age']

-steve



At 10:39 AM -0700 8/28/01, Mashrab Kuvatov wrote:
>Hi everybody,
>i'm a newie in php, but i have a general understanding
>of it.
>
>Recently, i've installed PHP as a static module on my
>Apache-1.3.19 and tried an example i read in PHP
>tutorial.
>
>Assume you have a page with a form like this on it:
>
><form action="action.php" method="post">
>Your name: <input type="text" name="name">
>You age: <input type="text" name="age">
><input type="submit">
></form>
>
>and action.php like this
>
>Hi <?php echo $name; ?>.
>You are <?php echo $age; ?> years old.
>
>This action.php is supposed to print out values one
>enters to the form fields. Right?
>
>So, my problem is that it doesn't. Instead, it prints
>Hi.You are years old.
>
>Can anyone help me to figure it out or to point me to
>the right direction so in future i won't annoy you
>with my silly questions.
>
>Thanks in advance,
>Mashrab.
>

-- 
+------------------------ Open source questions? ------------------------+
| Steve Edberg                           University of California, Davis |
| [EMAIL PROTECTED]                               Computer Consultant |
| http://aesric.ucdavis.edu/                  http://pgfsun.ucdavis.edu/ |
+----------- http://pgfsun.ucdavis.edu/open-source-tools.html -----------+

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