hi guys am developing a portal which has a registration form...
what happens is this, when the dropdown that is labeled state is selected another dropdown and text box is made visible, but the data from the state dropdown, LGA dropdown and unit textbox isnt submitting the data into my db...
i even tried echoing them out on in the process page but it doesnt work...
here is the script. am hoping someone would come to my aid on this thanks
Thanks dominic
10-24-2012, 08:19 PM
hastx
In your "register.txt", in your form you have multiple "<input type="unit" id="unit" name="unit" ..... placeholder="unit" required />" inputs.
Second: All form inputs must have a unique "name" attribute ( the first unit input might have a value, but the second one which may have none will overwrite it in the POST processing variables).
Third: You have the same thing going on with your select boxes sharing the same "name" values.
I did not look into your processing script since these issues might explain why you are getting blank values when echoing them. After you get the form cleaned up with unique inputs then we can look at the processing if necessary.
i even went as far as creating an array for it, cause i want it to post into the db but i can seem to post it.. i want when a user selects a state and the dropdown for LGA and unit is made visible, when he select the right LGA and types in his unit, its been sent into the db, cause the table in my db just has one column for LGA same as unit...