Jump to content

Inpute box for a file


ReVeR

Recommended Posts

[!--quoteo(post=356814:date=Mar 20 2006, 09:29 PM:name=ReVeR)--][div class=\'quotetop\']QUOTE(ReVeR @ Mar 20 2006, 09:29 PM) [snapback]356814[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Hello.
I need to make an inpute box that can select files on the server.How can that be done?
Thx
[/quote]

If you mean you want to list out the files in the server's directory so that the user can select one:

You can use PHP to get an array of the files on the server, and then use a loop to echo them back out...
( EXAMPLE: [a href=\"http://www.phpfreaks.com/phpref/90.php\" target=\"_blank\"]http://www.phpfreaks.com/phpref/90.php[/a] )

I don't know of any HTML that would be able to do this, you need a script to read the contents of a directory.. perhaps I'm wrong though - wouldn't be the first time.

If you mean that you want the user to be able to select a file on his/her PC:

<input type=file> is the HTML. Again, you really need PHP or another scripting language to be able to do anything but allow the user to browse his/her own computer..

( TUTORIAL: [a href=\"http://www.phpfreaks.com/tutorials/36/0.php\" target=\"_blank\"]http://www.phpfreaks.com/tutorials/36/0.php[/a] )
( TUTORIAL: [a href=\"http://www.tipsntutorials.com/tutorials/PHP/67\" target=\"_blank\"]http://www.tipsntutorials.com/tutorials/PHP/67[/a] )


I know it's not a great reply or a good answer, but I hope it helps point you in the right direction a bit. Good luck!
Link to comment
https://forums.phpfreaks.com/topic/5381-inpute-box-for-a-file/#findComment-19318
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.