Specifications

FIGURE 28.12
The Create Mail option gives the administrator an interface for uploading newsletter files.
The form you see is similar to a regular file upload form except that, in this case, we are using
it to upload multiple files. This necessitates some minor differences in the form syntax, and in
the way we deal with the uploaded files at the other end.
The code for the display_mail_form() function is shown in Listing 28.14.
LISTING 28.14 display_mail_form() Function from output_fns.phpThis Function
Displays the File Upload Form
function display_mail_form($email, $listid=0)
{
// display html form for uploading a new message
global $table_width;
$list = get_all_lists();
$lists = sizeof($list);
?>
<table cellpadding = 4 cellspacing = 0 border = 0 width = <?=$table_width?>>
<form enctype=’multipart/form-data’ action=’upload.php’ method=’post’>
<tr>
<td bgcolor = “#cccccc”>
List:
</td>
Building Practical PHP and MySQL Projects
P
ART V
696
34 7842 CH28 3/6/01 3:46 PM Page 696