Posted by Rich on 04/12/06 20:41
On Wed, 12 Apr 2006 18:15:21 +0200, Garry Jones wrote...
>
>I allows users to enter data in a form. I process the form with a php file.
>I return control to another page on my website. I want to dynamical create
>the page that they are returned to so I can show them a copy of what they
>just entered. I cant get the syntax of this. My host is set to globals on
>and php 4.
>
>Example
>Form
>
><FORM method="post" action="process_this.php" name="anmals" id="anmals" >
><TABLE width="400" BORDER="2" CELLSPACING="0" cellpadding="4">
><td >Name</td>
><td ><input type="text" size="45" name="realname" value= ""></td>
></TABLE>
></FORM>
>
>process_this.php
>$realname=$_POST['realname'];
>Header("Location: index5c.html")
>
>On index5c.html I want to use $realname to display the data the user entered
>on the form. There is something I am missing here as I am getting "null"
>back. I have tried various combinations of commands which I wont go into
>here. Can someone explain how I can pass the user data to index5c.html and
>display it.
>
>Garry Jones
>Sweden
>
>
Since your FORM ACTION is pointing to process_this.php, that's were you can
capture the values for $_POST. Because you are opening a new HTML document
called "index5c.html" that one will not know what the $_POST or $_GET form
variables are. Since you are passing the form fields to your process_this.php
program, you can use that to create conditions on what HTML document to print.
Rich
--
Newsguy Bandwidth Blowout April-18-2006
Unlimited downloads all day long
http://newsguy.com/nolimits.htm
[Back to original message]
|