Getting file and dir as settings

S

Sonnich

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
 
D

David Dorward

Sonnich said:
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.
 
J

Jerry Stuckle

Sonnich said:
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.
(e-mail address removed)
==================
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top