Re: [PHP] How do I pass variables from a PHP script to an HTML document?

2001-12-05 Thread Kurt Lieber

On Wednesday 05 December 2001 10:00 am, you wrote:

> Alternatively, is there another way to pass variables
> from a PHP script to a HTML form where I won't run into this limit?

I'm not seeing why you have to redirect the user just to get a custom 
response.

If you can instead use an include(); to customize your response, then you 
don't have to worry about redirecting the user to a different page.

In other words, instead of doing this:

form --> PHP Script --> confirmation page

Just do:

form --> PHP Script

And have the PHP script format and output the confirmation page.

--kurt

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] How do I pass variables from a PHP script to an HTML document?

2001-12-05 Thread Don

Hi,

I currently have a form that calls a PHP script when submit is pressed.  Within the 
PHP script, I wish to call a custom confirmation screen.  I do so by issuing the 
following command:

Header("Location: " . $form["redirect"]);

Now, I wanted my form variables passed from the PHP script to my HTML document so I 
wrote a function within the form that adds the variable names and values to the URL by 
urlencoing them like such:

$output = "?";
$output .= urlencode($key) . "=" . urlencode(stripslashes($val)) . "&";

returning the above in a variable $vars, I call my redirect as such:


Header("Location: " . $form["redirect"] . $vars);

If I am not mistaken, this is synonymous with an HTTP GET?

Here is my problem; the above fails with a large form, i.e., a form containing many 
fields.  A bit of investigation has determined that there is a 1Kb limit on the total 
size of a request (URL+params) and I have one form that must be exceeding the limit.

Question: Is there a way to emulate my above scheme via an HTTP POST as POST has no 
limit?  Alternatively, is there another way to pass variables from a PHP script to a 
HTML form where I won't run into this limit?

Thanks,
Don