Prev | Current Page 456 | Next

W. Jason Gilmore

"Beginning PHP and MySQL: From Novice to Professional"

An example
of a file-uploading form follows, and a screenshot of the corresponding output is shown
in Figure 15-1:

Name:


Email:


Class notes:




Figure 15-1. HTML form incorporating the file input type tag
Understand that this form offers only part of the desired result; whereas the file
input type and other upload-related attributes standardize the way files are sent to
the server via an HTML page, no capabilities are offered for determining what happens
once that file gets there. The reception and subsequent handling of the uploaded files
is a function of an upload handler, created using some server process, or capable serverside
language such as Perl, Java, or PHP. The remainder of this chapter is devoted to
this aspect of the upload process.
Uploading Files with PHP
Successfully managing file uploads via PHP is the result of cooperation between various
configuration directives, the $_FILES superglobal, and a properly coded Web form. In
CHAPTER 15 ?–  HANDL ING F ILE UPLOADS 389
the following sections, all three topics are introduced, concluding with a number of
examples.


Pages:
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468