RE: [PHP] multiple FORMS on same page problem.
| From: | Ruessel, Jan | Date: | Wed, 17 Sep 2003 07:32:10 +0000 |
| Subject: | RE: [PHP] multiple FORMS on same page problem. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-162833@lists.php.net to get a copy of this message | ||
You could also redirect with javascript:
echo "<Script Lang=javascript>";
echo "window.location.href = 'page5.php'";
echo "</script>";
Grtz
Jan
-----Original Message-----
From: John W. Holmes [mailto:holmes072000@charter.net]
Sent: Dienstag, 16. September 2003 18:06
To: Golawala, Moiz M (IndSys, GE Interlogix)
Cc: php-general@lists.php.net
Subject: Re: [PHP] multiple FORMS on same page problem.
Golawala, Moiz M (IndSys, GE Interlogix) wrote:
> It is almost working.. I can't figure out why I can get the "someVal" to
> page5.php.
>
> file: page4.php
>
> <?php
>
> if (isset($_REQUEST['submit1'])){
> echo "button 1 was clicked, act accordingly";
> echo "this the request values";
> echo $_REQUEST['someVal'];
> }elseif(isset($_REQUEST['submit2'])){
> session_start();
> echo "button 2 was clicked, act accordingly";
> $_SESSION['post'] = $_POST;
> header("Location:
> http://127.0.0.1/Alarms/page5.php?<?=SID?>");
header("Location: http://127.0.0.1/Alarms/page5.php?" .
SID);
But this is not going to work. You can only redirect with header() if
there has not been any output. That's why you are getting the errors.
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php