Accessing form element Name
Posted: Wed Jun 04, 2008 1:39 am
I need help trying to access the name of a form element.
eg. Sample 1: <input name="function1_name" type="text" />
Sample 2: <input name="function2_name" type="text" />
When the form is submitted I will use explode() or someother string function on the input Name (eg function1_name). The resulting string, or string portion, will actually be the name of the function to be called to process that value.
In the above example, the value for the first input would be passed to a procedure called function1 and the value for the second input would be passed to function2. The problem is that I am not sure how to access the names of the form elements in my php scripts.
Make sense?
Thanks
eg. Sample 1: <input name="function1_name" type="text" />
Sample 2: <input name="function2_name" type="text" />
When the form is submitted I will use explode() or someother string function on the input Name (eg function1_name). The resulting string, or string portion, will actually be the name of the function to be called to process that value.
In the above example, the value for the first input would be passed to a procedure called function1 and the value for the second input would be passed to function2. The problem is that I am not sure how to access the names of the form elements in my php scripts.
Make sense?
Thanks