You are here: Re: [PHP] Using POST to pass variables « PHP « IT news, forums, messages
Re: [PHP] Using POST to pass variables

Posted by "EasyHorpak.com" on 10/13/25 11:33

use $_POST[btnSend]; to use post method





----- Original Message -----
From: "Todd Cary" <todd@aristesoftware.com>
To: <php-general@lists.php.net>
Sent: Thursday, December 01, 2005 11:50 AM
Subject: [PHP] Using POST to pass variables


> When I have more than one button on a page, I us what I call a reentrant
> approach. That is the page calls itself.
>
> If the page is emailer.pgp, the the FORM tag would be
>
> <form method="get" action="emailer.php">
>
> At the top is
>
> <?php
> $send = $_GET[btnSend]; // Send button pressed
> $cancel = $_GET[btnCancel];// Cancel is pressed
> $message = $_GET[message];
> if ($send) {
> header("location: send.php?message=" . $message);
> }
> if ($cancel) {
> header("location: index.php");
> }
> ?>
>
> Is there a better way to do this so I can use a POST form?
>
> Thank you...
>
> Todd
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация