HELP!! Not sure how to process this form

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Peter

    HELP!! Not sure how to process this form

    I want to have a form which has several rows for example

    username1 firstname1 surname1
    username2 firstname2 surname2
    username3 firstname3 surname3
    username4 firstname4 surname4

    What I want to do is when this data is typed into the form to save it
    in a MYSQL db. The problem isn't with the saving, it's with the form
    itself. What is the best way to process this?

    I can't really name the various fields "username1" and "username2"
    because I would then need to replicate these as variables and this form
    generated could have an number of rows so hard coding the form field
    names with numbers makes it hard. Is there any way I can do this?? How
    have other people tackled this sort of thing in the past?
  • NoHeadRequired

    #2
    Re: HELP!! Not sure how to process this form

    "Peter" <uce_from_usene t@chatomatic.ne t> wrote in message
    news:2807200320 28327409%uce_fr om_usenet@chato matic.net...
    | I want to have a form which has several rows for example
    |
    | username1 firstname1 surname1
    | username2 firstname2 surname2
    | username3 firstname3 surname3
    | username4 firstname4 surname4
    |
    | What I want to do is when this data is typed into the form to save it
    | in a MYSQL db. The problem isn't with the saving, it's with the form
    | itself. What is the best way to process this?
    |
    | I can't really name the various fields "username1" and "username2"
    | because I would then need to replicate these as variables and this form
    | generated could have an number of rows so hard coding the form field
    | names with numbers makes it hard. Is there any way I can do this?? How
    | have other people tackled this sort of thing in the past?

    form fields are:
    username[]
    firstname[]
    surname[]

    result is then an array

    process with a loop to using count(username)


    Comment

    • NoHeadRequired

      #3
      Re: HELP!! Not sure how to process this form


      "Peter" <uce_from_usene t@chatomatic.ne t> wrote in message
      news:2807200320 54089545%uce_fr om_usenet@chato matic.net...
      | In article <bg30je$vfj$1@n ewsg2.svr.pol.c o.uk>, NoHeadRequired
      | <info@NoHeadReq uired.SPAM.tk> wrote:
      |
      | > "Peter" <uce_from_usene t@chatomatic.ne t> wrote in message
      | > news:2807200320 28327409%uce_fr om_usenet@chato matic.net...
      | > | I want to have a form which has several rows for example
      | > |
      | > | username1 firstname1 surname1
      | > | username2 firstname2 surname2
      | > | username3 firstname3 surname3
      | > | username4 firstname4 surname4
      | > |
      | > | What I want to do is when this data is typed into the form to save it
      | > | in a MYSQL db. The problem isn't with the saving, it's with the form
      | > | itself. What is the best way to process this?
      | > |
      | > | I can't really name the various fields "username1" and "username2"
      | > | because I would then need to replicate these as variables and this
      form
      | > | generated could have an number of rows so hard coding the form field
      | > | names with numbers makes it hard. Is there any way I can do this?? How
      | > | have other people tackled this sort of thing in the past?
      | >
      | > form fields are:
      | > username[]
      | > firstname[]
      | > surname[]
      | >
      | > result is then an array
      | >
      | > process with a loop to using count(username)
      |
      | so for example
      | <input type=text value=username[]>
      |
      | or
      |
      | <input type=text value=username[1]>
      |
      | cheers


      <input type=text name=username[]>



      Comment

      • Peter

        #4
        Re: HELP!! Not sure how to process this form

        In article <bg3e1i$tld$1@n ewsg1.svr.pol.c o.uk>, NoHeadRequired
        <info@NoHeadReq uired.SPAM.tk> wrote:
        [color=blue]
        > <input type=text name=username[]>[/color]

        cheers,

        You've been a great help.

        Comment

        Working...