NYCPHP Meetup

NYPHP.org

[nycphp-talk] MySQL and spaces in data

Adam Maccabee Trachtenberg adam at trachtenberg.com
Thu Jun 19 12:27:17 EDT 2003


> I'm creating check boxes on the fly. Here's a sample of the output on
> the form:
> 
> <input name="ALFA-ROMEO|1600 DUETTO SPIDER" type="checkbox" value="1">
> 
> Now here's the post data:
> [ALFA-ROMEO|1600_DUETTO_SPIDER]

Don't know exactly how you've got things set up, but maybe you could
change this to:

<input name="car_model[]" type="checkbox" value="ALFA-ROMEO|1600 DUETTO
SPIDER">

names can't have spaces, but values can. Also, looping through
car_model can be easier than a bunch of ifs.

-adam

-- 
adam at trachtenberg.com
author of o'reilly's php cookbook
avoid the holiday rush, buy your copy today!




More information about the talk mailing list