#1
  1. No Profile Picture
    Gardener
    Guest
    Devshed Newbie (0 - 499 posts)
    Hi!

    I have a dynamically made form with several text input boxes which are named "content_description1" through "content_description6". The number of them varies.

    I want to put the value of these input boxes into an array, how can I do it? I can't find a way to extract the name of the variables the value is put in. I can't hard code the names of them, since the number of them varies.

    Anyone have any suggestions? I'm totally new to PHP, but I have experience in other languages.

    Any help greatly appreciated.
  2. #2
  3. No Profile Picture
    rod k
    Guest
    Devshed Newbie (0 - 499 posts)
    Use something like:

    name=content_description[]

    This will place the entries in an the array $content_description indexed beginning at 0.

    HTH

    Rod
  4. #3
  5. No Profile Picture
    Gardener
    Guest
    Devshed Newbie (0 - 499 posts)
    OK, I'll try that, it seems better than what I've done now, which is a loop that goes through all the input boxes using eval() to construct the name of the variable and then put it in an array.

    Thanks!

    /Gardener

Similar Threads

  1. Log form information to a text file - Question
    By LotusHead in forum PHP Development
    Replies: 22
    Last Post: February 12th, 2004, 08:31 PM
  2. Referencing (many) form fields in an array
    By z974647 in forum ASP Programming
    Replies: 0
    Last Post: February 3rd, 2004, 11:12 AM
  3. From form write to file - array
    By TuxLives in forum PHP Development
    Replies: 0
    Last Post: January 25th, 2004, 01:22 AM
  4. HTTP Error 400: Bad Request, with basic form
    By crackwombat in forum PHP Development
    Replies: 1
    Last Post: January 23rd, 2004, 06:40 PM
  5. Array query using <SELECT> form field
    By u230503 in forum ASP Programming
    Replies: 1
    Last Post: January 19th, 2004, 03:13 PM

IMN logo majestic logo threadwatch logo seochat tools logo