RE: [PHP] more than one php
| From: | Jon Haworth | Date: | Wed, 09 Apr 2003 12:55:57 +0000 |
| Subject: | RE: [PHP] more than one php | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143065@lists.php.net to get a copy of this message | ||
Hi Diksha,
> i wanted to know if it is possible to pass the
> contents of one form to more than one PHP
> scripts. something like this:
>
> echo"<form method=get action=\"f1.php\ action=\"f2.php\">
No, you can't do this - what you have to do is pass it to f1.php, which does
its stuff and then redirects to f2.php:
<?php
// do something
header ("Location: http://example.com/f2.php?foo=".
$_GET['foo']);
exit;
?>
The only drawback with this approach is that f1.php can't output anything,
otherwise the header won't get sent. It's also harder with POST than GET
(but still possible).
HTH
Jon