Hi, i’m making a webform to manage some data. The data needs to be saved in a mysql database. On that form there is a listbox where the user can add items to. This i don’t have any problems with. There is also a save button on the form, wich needs to save all the data (so also all the listbox items). I have a few problems with this. 1) I use the $_POST[Nameoflistbox] function to get the items of my listbox, but this only gives me the selected items 2) Then i use a for loop to run through my items, and to get the option value i use $tmpNameArray[$i]. But this only gives me the first character of my optionValue?
Can anybody help me out please, i’m pretty new to PHP/Javascript. Here is a simplified form wich shows my problem:
}
}
?>
If i don’t select a value in my listbox, the echo count($Units); line shows 0, if i select a value then it shows 1.
If i select the second item, then 6 is inserted in the Unit column of my db.
Thanx in advance for your help.