ZendDeveloper
Programmer
Hi,
I have a form that posts quite a lot of data through to a php page. What I want to do is iterate through an array that is posted and if the array element has a blank value disable it before the form is actually posted so it doesn't get processed by the php script.
For example, I might have a form with these values in the post request:
products[001] = NULL
products[002] = NULL
products[003] = 1
products[004] = NULL
products[005] = 2
In this case, only products[003] and products[005] should actually be posted.
Can anyone point me in the right direction on this. I need a function that will strip the others from teh form when I call an onclick event from the form.
Thanks
I have a form that posts quite a lot of data through to a php page. What I want to do is iterate through an array that is posted and if the array element has a blank value disable it before the form is actually posted so it doesn't get processed by the php script.
For example, I might have a form with these values in the post request:
products[001] = NULL
products[002] = NULL
products[003] = 1
products[004] = NULL
products[005] = 2
In this case, only products[003] and products[005] should actually be posted.
Can anyone point me in the right direction on this. I need a function that will strip the others from teh form when I call an onclick event from the form.
Thanks