Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   Getting file and dir as settings (http://www.velocityreviews.com/forums/t362055-getting-file-and-dir-as-settings.html)

Sonnich 08-03-2006 01:35 PM

Getting file and dir as settings
 
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


David Dorward 08-03-2006 02:15 PM

Re: Getting file and dir as settings
 
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.


Jerry Stuckle 08-03-2006 09:15 PM

Re: Getting file and dir as settings
 
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.
jstucklex@attglobal.net
==================


All times are GMT. The time now is 12:19 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.