Getting file and dir as settings

Discussion in 'HTML' started by Sonnich, Aug 3, 2006.

  1. Sonnich

    Sonnich Guest

    Hi!

    I need to create a small settings window in PHP.

    I need to set options like
    1) an exe file
    2) directories (search path), one by one, output
    3) allowed users for certain items (string list)

    I found this:
    <input type="file" name="file" size="20" <? print("value=$mergerprg2");
    ?>>

    but I cannot set the present file here - how do I do that?

    how do I select a directory?

    as for the string list I will try tomorrow...

    BR
    Sonnich
     
    Sonnich, Aug 3, 2006
    #1
    1. Advertising

  2. Sonnich wrote:
    > I found this:
    > <input type="file" name="file" size="20" <? print("value=$mergerprg2");
    > ?>>
    >
    > but I cannot set the present file here - how do I do that?


    For security reasons, browsers do not allow websites to specify the
    value for file inputs (otherwise, for example, a site could specify a
    file containing sensitive data (such as passwords or credit card
    information) and then hide the input).

    > how do I select a directory?


    Browsers provide no facility to select directories.
     
    David Dorward, Aug 3, 2006
    #2
    1. Advertising

  3. Sonnich wrote:
    > Hi!
    >
    > I need to create a small settings window in PHP.
    >
    > I need to set options like
    > 1) an exe file
    > 2) directories (search path), one by one, output
    > 3) allowed users for certain items (string list)
    >
    > I found this:
    > <input type="file" name="file" size="20" <? print("value=$mergerprg2");
    > ?>>
    >
    > but I cannot set the present file here - how do I do that?
    >
    > how do I select a directory?
    >
    > as for the string list I will try tomorrow...
    >
    > BR
    > Sonnich
    >


    As David indicated, you can't select the directory or file information
    in PHP. However, you can use javascript to open a window browse for the
    file, then put the filename back into the input field.

    If you need more help, check comp.lang.javascript.

    --
    ==================
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.

    ==================
     
    Jerry Stuckle, Aug 3, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?UnVkeQ==?=

    Sub Dir, Virtual dir, what do I use?

    =?Utf-8?B?UnVkeQ==?=, Jun 12, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    448
    =?Utf-8?B?UnVkeQ==?=
    Jun 12, 2005
  2. donet programmer
    Replies:
    3
    Views:
    1,644
    Gregory A. Beamer
    Nov 20, 2009
  3. Matthew Denner
    Replies:
    1
    Views:
    218
  4. Kga Agk
    Replies:
    2
    Views:
    168
    Kga Agk
    Jun 29, 2009
  5. Nick Gnedin
    Replies:
    2
    Views:
    184
Loading...

Share This Page