Hmmmm.......

So in the receiving page I'll need to string together date_year[i],
date_month[i] and date_day[i] in order to get the full date for each
scheduled game.  Which is what CF apparently "glues together" for the
developer on the fly.

I'll try out both this method and the array method suggested by OP (I need
practice working with arrays in PHP anyway).

Thanks for the informative reply,

--Noah


----- Original Message -----
From: "Ford, Mike [LSS]" <[EMAIL PROTECTED]>
To: "'CF High'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, February 10, 2003 5:28 AM
Subject: RE: [PHP] Why does this happen?


> > -----Original Message-----
> > From: CF High [mailto:[EMAIL PROTECTED]]
> > Sent: 09 February 2003 20:52
> >
> > Here's the deal:
> >
> > Let's say I have a form that requests the season schedule of
> > a baseball
> > team, and the team in question has twenty scheduled games all
> > on different
> > days.
> >
> > Each form row will have three select elements for the date;
> > i.e. date(x) for
> > the year, date(x+1) for the month, and date(x+2) for the day,
> > or however
> > I'll need to make each date select element unique.
> >
> > Then, in the insert page, I'll need to loop through each date
> > element by
> > groups of three and create an array for each date set.
>
> If I'm reading this right, you need to do something like this on your form
> page:
>
> <form ....>
> <?php
>    for ($i=1; $i<=20; $i++):
> ?>
>       <select name="date_year[<?php echo $i ?>]">
>          ...
>       </select>
>       <select name="date_month[<?php echo $i ?>]">
>          ...
>       </select>
>          ...
> <?php
>    endfor;
> ?>
> </form>
>
> and then your receiving page will have arrays called $_POST['date_year'],
> $_POST['date_month'], etc (or the equivalent globals if you've chosen the
> insecure register_globals On route).
>
> Cheers!
>
> Mike
>
> ---------------------------------------------------------------------
> Mike Ford,  Electronic Information Services Adviser,
> Learning Support Services, Learning & Information Services,
> JG125, James Graham Building, Leeds Metropolitan University,
> Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
> Email: [EMAIL PROTECTED]
> Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to