Hi,
Sorry ....
Here is the HTML form informations
<form action="load.html" name="form1" method="post" enctype="multipart
+/form-data">
<table>
<tr class="cell4">
<td>Select EXCEL rate sheet</td>
<td><input type="file" name="file" value=""></td>
</tr>
<tr class="cell3">
<td> </td>
<td><input type="submit" name="upload" value="upload"></td>
</tr>
</table>
</form>
and Embperl code used is
if((defined $fdat{file} && $fdat{file}) && $fdat{upload}) {
$filename = "/tmp/sample.txt";
open (FILE, "> $filename") || die("open failed: $!");
while (read($fdat{file}, $buffer, 32768)) {
print FILE $buffer || die("print test: $!");
}
close FILE || die("close test: $!");
}
If we remove enctype="multipart/form-data" form property, can see the form data (filename) after submiting the page.
includng enctype="multipart/form-data" in form will give undef filename. Any idea?
thanks
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.