Re: Sending a PHP array from an HTML form



Kevin 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?


serialize() it.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================

.



Relevant Pages