Jump to content


Photo

Inpute box for a file


  • Please log in to reply
2 replies to this topic

#1 ReVeR

ReVeR
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 21 March 2006 - 01:29 AM

Hello.
I need to make an inpute box that can select files on the server.How can that be done?
Thx

#2 rawb

rawb
  • Members
  • PipPipPip
  • Advanced Member
  • 44 posts

Posted 21 March 2006 - 01:07 PM

[!--quoteo(post=356814:date=Mar 20 2006, 09:29 PM:name=ReVeR)--][div class=\'quotetop\']QUOTE(ReVeR @ Mar 20 2006, 09:29 PM) View Post[/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!

#3 ReVeR

ReVeR
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 22 March 2006 - 01:10 PM

thast basically what i needed.
I needed to get files on a dir on the server so user can select one of them.
THx




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users