#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Location
    Novato, CA. USA
    Posts
    7
    Rep Power
    0
    Hello All, I find that I need to tack on an extra ID tag for each item in an array that I'm returning from a form. I'm building the array like this:

    print "<INPUT TYPE="text" NAME="item[]" VALUE="$info"><br>n";

    And this works just fine. I was hoping to build the other array out of a set of hidden inputs, like this:

    print "<INPUT type="hidden" name="id[]" value=$num>n";

    Unfortunetly, this dose not seem to work. Is it possible to build arrays this way? Anyone have any other ideas of how I could store an array in an HTML file?

    TIA,

    Scott

    Comments on this post

    • Gran Roguismo agrees
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    That should work fine. Why do you say it doesn't work? The only possible problem I see is that $num is not in quotes, but that shouldn't matter as long as there are no spaces in $num. Are you sure $num has been assigned? Are you sure you are referring to the set array as $id in the target script?
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Location
    Novato, CA. USA
    Posts
    7
    Rep Power
    0
    Oooops, well there's yet another example why coding until 5:00 AM is not a good idea. I was trying to access the array from with in a function where I neglected to declare it GLOBAL.

    But thanks for the reassurance that what I was trying to do should have worked.

Similar Threads

  1. pasting value of hidden form
    By Sugar_addict in forum HTML Programming
    Replies: 1
    Last Post: February 14th, 2004, 06:40 PM
  2. HTTP Error 400: Bad Request, with basic form
    By crackwombat in forum PHP Development
    Replies: 1
    Last Post: January 23rd, 2004, 06:40 PM
  3. Replies: 13
    Last Post: January 22nd, 2004, 08:34 AM
  4. form creation using php
    By emzyme in forum PHP Development
    Replies: 4
    Last Post: January 15th, 2004, 06:23 AM
  5. cgi.pm module not compatible with multipart enctype syntax
    By Suzette in forum Perl Programming
    Replies: 2
    Last Post: December 22nd, 2003, 11:19 AM

IMN logo majestic logo threadwatch logo seochat tools logo