array insert help

From: Date: Sat, 22 Mar 2003 19:59:09 +0000
Subject: array insert help
Groups: php.general 
Request: Send a blank email to php-general+get-140710@lists.php.net to get a copy of this message
I need to create a form where work/home address details need to be entered. I'd like to have these listed as 2 entries in the mysql db so I'm assuming I need to create an array and loop through the array to do the insert. So I have an address[1] and address[2] for example.... for a total of 12 address fields in each set. (6 each) My problem is that I'm not sure how to set up the array for the fields and how to take the input fields and insert them. Do I need a multidimensional array for this? ie. <input type="text" name="address[address][]"> <input type="text" name="address[city][]"> How would I decode that to create an insert statement?? Any suggestions are greatly appreciated! Jason

« previous php.general (#140710) next »