RE: [PHP] how does list get passed thru' sessions
| From: | Sonia Tsui | Date: | Wed, 06 Sep 2000 23:53:26 +0000 |
| Subject: | RE: [PHP] how does list get passed thru' sessions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-15618@lists.php.net to get a copy of this message | ||
I have three questions regarding to your suggestion.
1) where do I put the form in the script? Anywhere after <a href=""></a>?
2) How do I pass a list/an array in the form?
3) Is there a way that I can passed array in the method I was using
(name1="value1"&name2="value2"...)?
---Sonia
-----Original Message-----
From: Robert J. Cissell [mailto:rcissell@tampabay.rr.com]
Sent: Tuesday, September 05, 2000 5:44 PM
To: Sonia Tsui
Subject: Re: [PHP] how does list get passed thru' sessions
>
> My second question is:
> without using session provided by PHP, is there any way of doing it
without
> the name and value pair show up on the browser?
> I know form with hidden variable should do it, but then how is it possible
> to submit a form without submit button?
>
Instead of putting in a submit button for your form, put in a link of the
type:
<a href="javascript:void(do_submit())">Whatever your link says</a>
In your form tag, make it look something like:
<form action="whatever.phtml" method="post" name="myForm">
In your head section, put in a javascript function:
<script language="javascript">
function do_submit()
{
document.myForm.submit();
}
</script>