Hi,
If I got it right you want to enter each entered value into db. This could get ugly, but it might be easier than you think.
First of all: if you have two inputs of the same name (although the ID might differ), unless you store the values in an array PHP will only work with the last one submitted (e.g.:
Code:
<input class="" type="text" name="place" id="place" value="" /> (say you enter "5"
...
<input class="" type="text" name="place" id="place" value="" /> (and here "1")
First of all: clash of IDs, page wouldn't validate. And if you get PHP to print the value of $_POST['place'] you'd get "1", not "5, 1".
Fix:
Code:
<input class="" type="text" name="place[]" id="ditch this" value="" /> (say you enter "5"
...
<input class="" type="text" name="place[]" id="ditch this" value="" /> (and here "1")
Once submitted use something like
PHP Code:
foreach($_POST['place'] as $place => $value)
{
// insert into db here
}
or
for($i=0; $i<count($_POST['place']); ++$i)
{
// do your operations here
}
or finally while()
Hope that puts you on track, I've done this for my CRM in the past (multiple telephone numbers of different type (mobile, landline, work...) for each contact using a bit of a mixture of javascript and PHP to dynamically extend the form for more/less records and insert into DB.
If you get stuck (or it isn't clear enough) please give us a shout again.
Cheers,
hoopyfrood