Hello, I am passing some variables via a form. There are 3, and they are named: DataAB1, DataAB2, DataAB3. In a mysql database, I have a table in which the 'prodid' column is populated with the entries AB1, AB2, AB3.
The DataABx variables are supposed to contain integers, however, they may not all have a value passed in. For example, only DataAB2 and DataAB3 may contain a value.
In the script that processes the form, I wish to check if the DataABx variables have a value or not. Is there any way of looping through the variables that are passed to the script?
Another unsuccessful method that I tried was concatenating variable names: Since the prodid was the last few characters of the Data variable, I tried selecting prodid from my database, and concatenating that entry to $Data. However, this did not work.
My ultimate goal is to output something if the $DataABx variable actually contains a value.
I appreciate any help,
Prasanna