|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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? |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
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. jstucklex@attglobal.net ================== |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Dec 12, 6:28 pm, Jerry Stuckle <jstuck...@attglobal.net> 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...@attglobal.net > ================== 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? |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
Kevin wrote:
> On Dec 12, 6:28 pm, Jerry Stuckle <jstuck...@attglobal.net> 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...@attglobal.net >> ================== > > 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@attglobal.net ================== |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On Wed, 12 Dec 2007 18:32:20 -0800 (PST), Kevin <kevin@westportwa.com>
wrote: >On Dec 12, 6:28 pm, Jerry Stuckle <jstuck...@attglobal.net> 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...@attglobal.net >> ================== > >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 s, GD |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
Yes. Thank you!
|
|
![]() |
| Outils de la discussion | |
|
|