RE: [PHP-WIN] basic form processing
| From: | Dash McElroy | Date: | Thu, 23 May 2002 21:56:41 +0000 |
| Subject: | RE: [PHP-WIN] basic form processing | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-13956@lists.php.net to get a copy of this message | ||
No probs.
Quick reminder: If you see the variables in the URL, it's GET. If you don't,
it's POST.
-Dash
-----Original Message-----
From: Nicole Amashta [mailto:430ntr3k@bellsouth.net]
Sent: Thursday, May 23, 2002 2:59 PM
To: php-windows@lists.php.net
Subject: Re: [PHP-WIN] basic form processing
Sorry for the double reply ! I didn't see this ...
;)
Dash McElroy wrote:
> Change this line:
>
> <FORM ACTION='results_1.php'>
>
> to:
>
> <FORM ACTION='results_1.php' method=POST>
>
> -Dash
>
> -----Original Message-----
> From: Bill Hudspeth [mailto:wbhk@unm.edu]
> Sent: Thursday, May 23, 2002 8:58 AM
> To: php-windows@lists.php.net
> Subject: [PHP-WIN] basic form processing
>
>
> I am new to PHP and have been trying without success to process a very
> simple form. My basic problem is trying to pass variables from a form to
> another page, and to echo them in a results page.
>
>
>
> I understand that the most recent versions of PHP allow you to pass
> user-entered form variables in the $_POST or $_GET associative arrays. I
> have set the "register_globals = off" in my php.ini file (under C:\winnt,
> running Win2000 and Microsoft IIS). When I try to submit the form, the
> results page is displayed without the values of the two form variables. I
> would very much appreciate some help with this simple problem. The basic
> code for my form (form_a.php) is:
>
>
>
> ************************************************************************
>
> <HTML>
>
> <HEAD>
>
> <TITLE>Test Form One</TITLE>
>
> </HEAD>
>
> <BODY>
>
> <B>
>
> <H2>Test Form One</H2>
>
>
>
> Fill out the information below
>
> <FORM ACTION='results_1.php'>
>
> Your First Name: <INPUT TYPE="Text" NAME="FirstName">
>
> <BR>Your Last Name: <INPUT TYPE="Text" NAME="LastName">
>
> <BR><INPUT TYPE="submit" VALUE="Submit Data">
>
> </FORM>
>
> </B>
>
> </BODY>
>
> </HTML>
>
> ************************************************************************
>
> The target page that displays the form variables (results_1.php) is as
> follows:
>
>
>
> <HTML>
>
> <HEAD>
>
> <TITLE>Results from Form One</TITLE>
>
> </HEAD>
>
> <BODY>
>
> <B>
>
> <H2>Results from Form One</H2>
>
> <?PHP
>
> echo "Thanks $_POST[FirstName] $_POST[LastName]";
>
> ?>
>
> </B>
>
> </BODY>
>
> </HTML>
>
>
>
> Thanks in advance, Bill
>
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php