Try: echo "Thanks " . $_POST['FirstName'] . " " . $_POST['LastName']";
-- Scott Carr OpenOffice.org Whiteboard-Doc Maintainer http://whiteboard.openoffice.org/doc/ Quoting Bill Hudspeth <[EMAIL PROTECTED]>: > 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 > > ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/ -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php