12.3. Managing File Uploads

File uploads can be done with every RFC-1867–compliant browser, such as Mozilla and Netscape. File uploading means that you can store a file on a Web server where it can be used for further treatment. It does not matter if the file is in binary or ASCII format because the file is processed as a unit byte by byte. Usually files are uploaded with the help of a POST request, as shown in the next listing:

 <html> <head> <title>Title</title> </head> <body> <h1>Working With File Uploads</h1> <form id="data" method="post" action="input_file.php" enctype="multipart/form-data"> <p> Choose a file: <br> <input name="testfile" type="file" size="50" maxlength="100000"><br> <input name="submit" type="submit"> </p> </form> </body> ...

Get PHP and PostgreSQL: Advanced Web Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.