Hi Anna,
Your REGISTER_GLOBALS is most probably set to OFF (see php.ini file). Try
using the special $_POST array created by PHP:
if ($_POST['submit'] == click){
echo Hello, $_POST[UserName];
}
If your form was using the GET method you would need the $_GET array.
Regards,
Daniel
Anna Gyor mailto:[EMAIL PROTECTED] scribbled;
Hi,
I just began to learn php and I have te following code. How can I get
the input field value in the php script? Because my script doesn't
work. $UserName is always an empty string.
?php
if ($submit == click){
echo Hello, $UserName;
What is of your PHP version?
I guess of your directive register_globals = off in your php.ini, so your
code would be run OK like this:
?php
if ($_POST['submit'] )
{
echo 'Hello'.$_POST['UserName'];
}
?
--jp
At 21:31 24-09-2002 +0200, Anna Gyor wrote:
Hi,
I just began to learn php
a search.php. Just print the information on
that page.
Chuck
-Original Message-
From: Jesse Cablek [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 24, 2002 3:39 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP] html input and php (newbie)
Anna Gyor mailto:[EMAIL PROTECTED] scribbled;
Hi
4 matches
Mail list logo