Just a quick sql command needed

Discussion in 'Databases' started by Alexj17, Aug 9, 2008.

  1. #1
    Hi All

    Hoping someone can help me out.

    I have created many different forms the user fills out and clicks submits. The results are passed to a another page which contains the sql to insert it into the database.

    All the data that is passed stores on the same line in the database in the different colums.

    What i want to do is allow the user to type in (for example) the first name of 10 people, and each will add a new line in the database, creating a new entry for each.

    How can i do this?

    Regards
    Alex James
     
    Alexj17, Aug 9, 2008 IP
  2. dcr226uk

    dcr226uk Peon

    Messages:
    174
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    research arrays for which every programming language you are using.

    php will be different for asp, but the basic grammar will be to create an array of strings form the data recieved from the form. Then for each string in the array, create and execute the SQL insert.
     
    dcr226uk, Aug 12, 2008 IP
    Alexj17 likes this.
  3. Alexj17

    Alexj17 Member

    Messages:
    173
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #3
    Thanks alot, i know exactly what you mean and how that will work, thanks !!!

    p.s I bloody hate arrays but its got to be done.
     
    Alexj17, Aug 13, 2008 IP
  4. skynex53

    skynex53 Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    good discution !
     
    skynex53, Aug 14, 2008 IP