Re: newbie bigtime
| From: | k spellman | Date: | Thu, 16 May 2002 02:22:44 +0000 |
| Subject: | Re: newbie bigtime | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-97862@lists.php.net to get a copy of this message | ||
The code for form.html is
<HTML>
<HEAD>
<TITLE>HTML Form</TITLE>
</HEAD>
<BODY>
<FORM ACTION="HandleForm.php" METHOD=POST>
First Name <INPUT TYPE=TEXT NAME="FirstName"
SIZE=40><BR>
Last Name <INPUT TYPE=TEXT NAME="LastName"
SIZE=40><BR>
E-mail Address <INPUT TYPE=TEXT NAME="Email"
SIZE=40><BR>
Comments <TEXTAREA NAME="Comments" ROWS=5
COLS=40></TEXTAREA><BR>
<INPUT TYPE=SUBMIT NAME="Submit" VALUE="Submit">
<INPUT TYPE=RESET NAME="Reset" VALUE="Reset">
</FORM>
</BODY>
</HTML>
and the code for the HandleForm.php is
<HTML>
<HEAD>
<TITLE>Form Results</TITLE>
</HEAD>
<BODY>
<?php
/* This page receives and handles the data generated
by "form.html". */
print "Your first name is $FirstName.<BR>\n";
print "Your last name is $LastName.<BR>\n";
print "Your E-mail Address is $Email.<BR>\n";
print "This is what you had to say:<BR>\n
$Comments<BR>\n";
?>
</BODY>
</HTML>
And the book suggested POST instead of GET because it
is stated that Post is secure and GET is not.
Thanks,
spellman
--- Miguel Cruz <mnc@stoic.net> wrote:
> On Wed, 15 May 2002, k spellman wrote:
> > Just opened a "How to" book today on PHP. Already
> > having problems and wouldn't mind an extra set of
> > eyes. My basic form does not produce results.Any
> > thoughts on this one?
> >
> > http://www.hermengoode.com/php/form.html
>
> Well, you don't show your source code, but if I had
> to guess I'd say you
> have a newish install of PHP and an oldish book, and
> you're trying to get
> the value of $LastName rather than
> $_GET['LastName'].
>
> miguel
>
__________________________________________________
Do You Yahoo!?
LAUNCH - Your Yahoo! Music Experience
http://launch.yahoo.com