Thread: dialog box
View Single Post
Old Feb 28th, 2006, 10:54 AM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Use the input field of type 'file'. You don't get a lot of stylistic or other control over this thangy, but it works and enforces the sandbox concept. Example:
   <!-- MAX_FILE_SIZE must precede the file input field -->
   <input type="hidden" name="MAX_FILE_SIZE" value="20000" />
   <!-- Name of input element determines name in $_FILES array -->
   Avatar file: <input id="avatar" name="avatar" type="file" value=""/>
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote