I had two forms. An upload file form and a text box. I made an attempt to combine these forms and all of a sudden I had problems with my file uploads.
I get this error:
Warning: Unable to open 'C:\Documents and Settings\-Sol-\Desktop\acttop.gif' for reading: No such file or directory in /home/mailoverftp/web/htdocs/master.php on line 249
The funny thing about it is that I have not touched the origonal upload script. And I went back and the old stand alone script still works great.
Is there some sort of problem with trying to use forms with multiple options?
Here is my HTM form source:
<form method="POST" action="master.php">
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber8">
<tr>
<td width="100%">
<table border="0" cellpadding="4" cellspacing="4" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber9">
<tr>
<td width="100%">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr>
<td width="100%">
<p align="center">Web Based File and Message Deployment</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber2">
<tr>
<td width="100%">
<p align="center"><br>
Recipient:
<select size="1" name="recipients[]" >
<option>east</option>
<option>cora</option>
<option>loraine</option>
<option>glen</option>
<option>fay</option>
<option>claribel</option>
<option>devin</option>
<option>elana</option>
<option>ivy</option>
<option>astra</option>
<option>kody</option>
<option>ava</option>
<option>anjelica</option>
<option>carmel</option>
<option>barbi</option>
<option>felicity</option>
<option>drew</option>
<option>ginger</option>
<option>freya</option>
<option>hope</option>
<option>haley</option>
<option>jean</option>
<option>isa</option>
<option>joyce</option>
<option>jill</option>
<option>myles</option>
<option>monte</option>
<option>lamb</option>
<option>nova</option>
<option>neil</option>
<option>lisa</option>
<option>heather</option>
<option>kristy</option>
<option>greta</option>
<option>beth</option>
<option>bonita</option>
<option>kimby</option>
<option>mara</option>
<option>dai</option>
<option>nina</option>
<option>emily</option>
<option>All China Homes</option>
</select>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber3">
<tr>
<td width="50%">
<table border="0" cellpadding="4" cellspacing="4" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber5">
<tr>
<td width="100%">
<p align="center">
<p align="center">Message File Name:
<input type="text" name="fname" size="20"><br><br>
Message Body<br>
<textarea rows="21" name="body" cols="40%"></textarea></p>
</td>
</tr>
</table>
</td>
<td width="50%">
<table border="0" cellpadding="4" cellspacing="4" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber6">
<tr>
<td width="100%">
<p align="center">
<input type="hidden" name="MAX_FILE_SIZE" value="5000000">
<input name="file0" type="file"><br>
<input type="hidden" name="MAX_FILE_SIZE" value="5000000">
<input name="file1" type="file"><br>
<input type="hidden" name="MAX_FILE_SIZE" value="5000000">
<input name="file2" type="file"><br>
<input type="hidden" name="MAX_FILE_SIZE" value="5000000">
<input name="file3" type="file"><br>
<input type="hidden" name="MAX_FILE_SIZE" value="5000000">
<input name="file4" type="file"><br>
<input type="hidden" name="MAX_FILE_SIZE" value="5000000">
<input name="file5" type="file"><br>
<input type="hidden" name="MAX_FILE_SIZE" value="5000000">
<input name="file6" type="file"><br>
<input type="hidden" name="MAX_FILE_SIZE" value="5000000">
<input name="file7" type="file"><br>
<input type="hidden" name="MAX_FILE_SIZE" value="5000000">
<input name="file8" type="file"><br>
<input type="hidden" name="MAX_FILE_SIZE" value="5000000">
<input name="file9" type="file"><br>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber4">
<tr>
<td width="100%">
<table border="0" cellpadding="4" cellspacing="4" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber7">
<tr>
<td width="100%">
<p align="center">
<p align="center"><input type="submit" value="Send">
<input type="reset" value="Reset" name="B2"></p>
</form>
Here is part of "master.php" the part that deals with $file0 of the upload part.
if ($file0 != "none")
{
copy ( $file0, "$file_dir/$file0_name");
system( "zip -j temp/$filename$number temp/$file0_name");
unlink ("temp/$file0_name");
$fp = fopen ("logs/com.log", "a");
fputs ( $fp, "........................$file0_name ($file0_size)\n\n" );
fclose ( $fp );
}
Thanks for the help!!!