Results 1 to 2 of 2

Thread: toggle but not

  1. #1
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default toggle but not

    I want something similar to a toggle but with it being interpreted. I think this would have to be javascript but am not sure maybe another language could do it as well.
    I have a form. I want the user to be able to type in the number of images they want to upload. Then that number of file inputs comes down. This is my forms code. Any ideas I appreciate thanks.


    PHP Code:
    <form action="mwtmpsubmit.php" method="post">
    <
    textarea name="content">Enter Content Here</textarea><br />
    How many images do you want to upload?<input type="text" name="files" /><br />
    <
    input name="userfile[]" type="file" />
    <
    input type="submit" value="Create Page" />
    </
    form

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    I think it would be something like this but this is a mashing of php and javascript?. I guess i'd also need some javascript to take out that number entry after the while was performed or make it hidden or display none. Thanks.

    Code:
    i=0
    <input name="number" type="text" />
    
    while ( i > number {
    echo "<input name="userfile[]" type="file" />";  
    i = i + 1;
    }

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •