13.09.2016 Views

PHP and MySQL Web Development 4th Ed-tqw-_darksiderg

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

726 Chapter 30 Building a Mailing List Manager<br />

The form you see is similar to a regular file upload form except that, in this case, you<br />

use it to upload multiple files.This use necessitates some minor differences in the form<br />

syntax <strong>and</strong> in the way you deal with the uploaded files at the other end.<br />

The code for the display_mail_form() function is shown in Listing 30.15.<br />

Listing 30.15 display_mail_form()Function from output_fns.php—This<br />

Function Displays the File Upload Form<br />

function display_mail_form($email, $listid=0) {<br />

// display html form for uploading a new message<br />

global $table_width;<br />

$list=get_all_lists();<br />

$lists=sizeof($list);<br />

?><br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!