RE: [PHP-DB] db confusion

From: Date: Sat, 12 Apr 2003 02:45:17 +0000
Subject: RE: [PHP-DB] db confusion
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-27032@lists.php.net to get a copy of this message
> I currently have this in my php file: > > <? > for($i = 0; $i <= 13; $i++): > $airday = strtotime("+$i day"); > echo '<INPUT TYPE="checkbox" NAME="airdate" VALUE="'. > date('Y-m- > d',$airday) > .'">'. date('l, F j',$airday).'<BR>'; > endfor; > ?> > > which produces this output in a loop for the dates of the next 2 weeks: > > <INPUT TYPE="checkbox" NAME="airdate" > VALUE="2003-04-11">Friday, April > 11<BR> You need to make these elements an array, otherwise only one checked item will come through. <INPUT TYPE="checkbox" NAME="airdate[]" VALUE="2003-04-11">Friday, April 11<BR> Notice the [] tacked onto the name. Now, when you check some boxes and submit the form, do a print_r($_REQUEST['airdate']) to see what you have to work with. ---John Holmes...

« previous php.db (#27032) next »