milo3169
Programmer
- May 2, 2007
- 42
I hope someone will be able to help me on this.
I am validating a form in PHP. If the validation fails, it includes the form to display the errors and the fields that passed the validation have the text that was input from before. However, I have an input field that is generated from an array and when the validation fails, the fields come back blank in the qty textbox.
I am able to take the "qty[]" array to process it after form submission, but if the validation fails I don't know how to display the information back into the textbox like you would on a normal textbox ei... $_POST["var"]. I've been having a lot of trouble trying to figure this out. Does anybody have any insight on how to do this?
I am validating a form in PHP. If the validation fails, it includes the form to display the errors and the fields that passed the validation have the text that was input from before. However, I have an input field that is generated from an array and when the validation fails, the fields come back blank in the qty textbox.
Code:
<input class='qty-input-box' type='textbox' name='qty[]' size='1' value='"not sure what to put here"'/>
I am able to take the "qty[]" array to process it after form submission, but if the validation fails I don't know how to display the information back into the textbox like you would on a normal textbox ei... $_POST["var"]. I've been having a lot of trouble trying to figure this out. Does anybody have any insight on how to do this?