Re: Sending a PHP array from an HTML form
- From: NN <NoName@xxxxxxxx>
- Date: Thu, 13 Dec 2007 16:01:32 -0600
On Wed, 12 Dec 2007 18:32:20 -0800 (PST), Kevin <kevin@xxxxxxxxxxxxxx>
wrote:
On Dec 12, 6:28 pm, Jerry Stuckle <jstuck...@xxxxxxxxxxxxx> wrote:
Kevin wrote:
I have a PHP array named $CurrentDate[]
I have a simple html form.
<form name='MyForm' method='post' action='Calendar.php'>
<input name="FirstName" type="text">
<input name="LastName" type="text">
<input name='submit' type='submit' value='submit'>
</form>
How do I send the $CurrentDate[] array with the form to the
Calendar.php page?
Store it in the session or as a hidden field in your form.
Every time the user goes to a new page, everything previous to that page
is lost unless it's store in the $_SESSION variable or is sent with the
request (i.e. a hidden field).
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@xxxxxxxxxxxxx
==================
I guess I was not clear. I want to store it as a hidden field in the
form, but how do I make the hidden field send the contents of the
array?
I think this is what you need:
<input type="hidden" value="<?php echo $CurrentDate; ?>">
or
<input type="hidden" value="<?php echo serialize($CurrentDate); ?>">
hope this helps,
GD
.
- Follow-Ups:
- Re: Sending a PHP array from an HTML form
- From: Kevin
- Re: Sending a PHP array from an HTML form
- References:
- Sending a PHP array from an HTML form
- From: Kevin
- Re: Sending a PHP array from an HTML form
- From: Jerry Stuckle
- Re: Sending a PHP array from an HTML form
- From: Kevin
- Sending a PHP array from an HTML form
- Prev by Date: Re: Simple quote with variable question
- Next by Date: Re: Function that returns date of file.
- Previous by thread: Re: Sending a PHP array from an HTML form
- Next by thread: Re: Sending a PHP array from an HTML form
- Index(es):
Relevant Pages
|