OK.
So I have one page that collects data using the following form.
<h1>Send Periodical!</h1>
<form action='periodical.php' method='post' name='sendperiodical' enctype='multipart/form-data'>
<h3>Welcome to command central for sending the current issue of Periodical to the Periodical subscriber base. $message7</h3>
<h2>Enter an authorized username:</h2>
<h2><input type='text' name='username' size='30' maxlength='50' border='0' value=''></h2>
<h2>Enter the password associated with the authorized username you entered:</h2>
<h2><input type='password' name='password' size='15' maxlength='15' border='0' value=''></h2>
<h2>Enter the name of table that holds subscriber e-mail addresses:</h2>
<h2><input type='text' name='sendtable' size='25' maxlength='25' border='0' value=''></h2>
<h2>Enter the message that you want to accompany this week's issue of Periodical:</h2>
<h2><textarea name='message' value='$message' rows='4' cols='40'></textarea></h2>
<h2>Enter the name of the file that will be attached to the Periodical e-mail:</h2>
<h2><input type='file' name='filename' size='25' value='' border='0'></h2>
<h2>Press the "Proceed" button below to proceed to the next step.</h2>
<h2><input type='submit' name='proceed' value='Proceed' border='0'></h2>
<h2></h2>
</form>
And I have another page -- actual the same include file that displays a different form depending what is passed to it from my periodical.php page -- that uses a form to display data from the previous page, so the reader can review it, and press the submit button to continue.
<form action='periodical.php' method='post' name='sendperiodical'>
<h3>$message2</h3>
<h2>Authorized User Name: $username</h2>
<h2>Table Name: $sendtable</h2>
<h2>Message Text: $message</h2>
<h2>Name of File That Will Be Attached to the E-Mail: $filename</h2>
<h1>Send the Current Issue of Periodical to the Entire Periodical Subscriber Base</h1>
<h2><input type='submit' name='sendperiodicaltoall' value='Send the Current Issue of Periodical to the Subscriber Base!' border='0'></h2>
</form>"
The code goes on to attach the periodical to an e-mail before sending it. It works when I send the email with file attached without the confirmatin page.
My problem occurs when i add the confirmaiton page. I get the name of the temporary php file, /tmp/phprPkXth, instead of the name of the periodical.pdf file I am trying to send on the confirmation page and when I try to send the e-mail I get I get the following error.
Warning: fopen("/tmp/phprPkXth", "r") - No such file or directory in /home/v/l/user840907/html/periodical.php on line 242
Warning: stat failed for /tmp/phprPkXth (errno=2 - No such file or directory) in /home/v/l/user840907/html/periodical.php on line 242
Warning: Supplied argument is not a valid File-Handle resource in /home/v/l/user840907/html/periodical.php on line 242
The file 'periodical.php' is the php file that controls the whole experience. It includes an include file that features the form.
The enctype='multipart/form-data' language in the first form is what causes the temporary name but I need it to attach the file.
Help. How do I get around this problem?