This is the following problem:
ASP-CODE
'Run through till all checked messages are approved
For each iaryMesageID in Request.Form("approve")
'Initalise the uploadSQL variable with the SQL string
uploadSQL = "SELECT * FROM disapprovedfiles"
uploadSQL = uploadSQL & " WHERE UploadID=" & iaryMesageID
'Query the database
adoRec.Open uploadSQL, strCon
'Approve the record is one is returned by the recordset
If NOT adoRec.EOF Then
adoRec.fields("Approved") = true
' boxname = "downloads" & adoRec.Fields.Item(0)
downloadstemp = Request.Form("downloads" & adoRec.Fields.Item(0))
adoRec.fields("Downloads") = downloadstemp
end if
'Close the recordset
adoRec.update
adoRec.Close
Next
What I got in PHP code now
while (list($key,$val) = each ($_POST)) {
echo "Key: $key; Value: $val<br>\n";
}
This would have been the same as the foreach.
I have set the value of a ID out of the database! The question is how to loop trough all checkboxes with name "approve", and get the value out of it?