I need to create a form that contains multiple lines for the same
data....an array looks like the answer.
My form:
Date Name Title Phone
=============== =============== ======
_____ ________ _________ ________
My first though was to have variables:
date, name, title, phone, date1, name1, title1, date1,
date2,name2,tit le2,phone2,date 3,name3,title3, date3
etc so that I can have 10 "lines" for the user to enter this data into.
Some will enter 1 line, others all 10.
So far, my clunky methods work....however trying to decide how many
lines they have filled out led me to thinking "perhaps I should use an
array instead".
This data is submitted to a database (mysql on linux) and I am not sure
if even that will work.
My question is HOW can I build a form that contains 4 fields that could
be repeated across numerous lines....then put it all into a db for
retrieval later?
Hope my question isn't too confusing!
kf4pfw
data....an array looks like the answer.
My form:
Date Name Title Phone
=============== =============== ======
_____ ________ _________ ________
My first though was to have variables:
date, name, title, phone, date1, name1, title1, date1,
date2,name2,tit le2,phone2,date 3,name3,title3, date3
etc so that I can have 10 "lines" for the user to enter this data into.
Some will enter 1 line, others all 10.
So far, my clunky methods work....however trying to decide how many
lines they have filled out led me to thinking "perhaps I should use an
array instead".
This data is submitted to a database (mysql on linux) and I am not sure
if even that will work.
My question is HOW can I build a form that contains 4 fields that could
be repeated across numerous lines....then put it all into a db for
retrieval later?
Hope my question isn't too confusing!
kf4pfw
Comment