I'm working on a database project using the PHP wizard and
mySQL. Things are going along well but I have a question about how
to set up particular type of input form.
I have a record that someone's name and some related
information. This easily goes into a table in my database into one
row. This person though may have a listing of dozens and dozens of
URLs associated with them. I'm not sure the best way to set up the
form so that the user can easily input all these URLs.
Ultimately, each URL will end up as a row in a table devoted
to storing these addresses. Each URL will be on it's own row with a
Should I use a separate, single line input field for each URL
to go into? But if I do, I don't know exactly how many URLs may be
input...there could be hundreds and having the user tab to each
one, then copy/paste a single line into the text input could get
long and tedious.
What I'd like to do is have a field where the end user could
copy an entire block of hundreds of URLs into it, and when it's
time to save the information to the database, my Flex app can write
each individual line in the text area into a row in my database. Is
this feasible and is there Flex code that would allow me to extract
"line 1 of text area" then "line 2 of text area", etc. until there
are no more lines.
I'm coming from Lingo/Director where this is easy but I'm not
sure how to do it yet in Flex.
I think what you want to do is use something like the String
class's split() function. Have the user input URLs that are
delimited in some way (with a comma or a semicolon or something
(url1;url2;url3, etc), and then split the input into x number of
strings. Then store those strings in a separate table keyed off of
the user's ID.