I have an HTML form that is created by selecting data from a mysql table. The page gets the table name as a variable and creates the form by looping through the table fields (not the values within the fields). I used mysql_fetch_field in order to do this. Displaying the form and validating it, on the client's side, is no problem at all. My problem starts when I submit the form. The form action is set to a page "X" and uses the method POST. Is there a way for me to retrieve the POST data without knowing the form field names? I know $_POST is an array, so there must be a way ($_POST[index number] doesn't work). In english, what I would like to do is: for each field in $_POST fields do something. I could, I suppose, retrieve the field names from the mysql table before reading the post data and in this way know what the field names are. However, I'm sure there's a better way. Does anyone know of a solution?
nico_swd's method works like a charm - thanks again. However, if by any chance someone is also using input type='file' fields, that person would also have to loop through the FILE array: foreach((array)$_FILES AS $index => $value){ echo $index . " = " . $value['tmp_name'] ."<br>"; } just a tip