Re: attaching php-action to form-button
| From: | Mincu Alexandru | Date: | Fri, 07 Mar 2003 15:09:55 +0000 |
| Subject: | Re: attaching php-action to form-button | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-138637@lists.php.net to get a copy of this message | ||
On Fri, 2003-03-07 at 14:19, Ernest E Vogelsinger wrote:
> At 12:59 07.03.2003, Michiel van Heusden said:
> --------------------[snip]--------------------
> >I have some variables defined which i'm sending through get
> >
> ><form name="form1" method="get" action="result.php">
> >// input's etc
> ></form>
> >
> >now I have $var1 defined in my PHP and I want to send it through that GET as
> >well
> >is there a way to do this?
> >
> >so it's not a user-defined but php-defined var, which i need to send through
> >the form
> --------------------[snip]--------------------
>
> use a hidden field:
>
> <form name="form1" method="get" action="result.php">
> <input type="hidden" name="var" value="<?php echo
> htmlentities($var); ?>">
> // input's etc
> </form>
>
or :
<form name="form1" method="get" action="result.php?var=<?php echo
urlencode($var); ?>">
<!-- inputs -->
</form>
>
>
> --
> >O Ernest E. Vogelsinger
> (\) ICQ #13394035
> ^ http://www.vogelsinger.at/
--
Mincu Alexandru intelinet.ro
Tel:+4 0745 369719 +4 021 3140021
www.intelinet.ro office@intelinet.ro