Hi all,
Im trying to duplicate this ASP code in PHP.
Basically its a form of 10 records pulled from an MySQL table. The
form lets the user update all 10 records at once if they want to.
Each text box I name using the ID of the database record and the
Database Field. Example: 3|Name (3 is the ID and Name is the
database field)
When the form is submitted this code is run:
for x = 1 to request.form.count()
if request.form.key(x) <> "Submit" then
curFld = request.form.key(x)
aryCats = split(curFld, "|")
ID = aryCats(1)
Field = aryCats(2)
Data = request.form(curFld)
strSQL = "UPDATE " & Table & " Set " & Field & "= '" & Data "'
WHERE ID = " & ID
'response.write strSQL
conn.execute strSQL
end if
next
The code loops thru all the objects on the form. It takes each object
name and splits it into an array using the | in the object name.
Is there anything in PHP that will count the number of objects on a
form and let you loop thu them like this script?
Thanks in advance,
Mark
ma********@ermsolutions.com