Hello All,
I have a form that allows a user to enter there name email address subject and text area for comments I attached a spot to upload an image to be attached to the email. Yet I am having trouble with the image showing up on the other end in the email as a .dat file (phpXuBK7g.dat)??? here is some of the code that does this
Code:
<form enctype="multipart/form-data" method="post" action="http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'].'">
Filename:
<br />
<input type="file" name="filename" size="30" />
<input type="submit" name="submit" />
</form>
PHP Code:
mosMail($_POST['*request_email'], $_POST['*request_name'], email@email.com', Submission', $body, 1 ,'','',$_FILES['filename']['tmp_name']
mosMail calls phpMail and sends the attachment which works.
the other questions I have are follows?
If I do
PHP Code:
echo "<PRE>";
print_r($_POST);
echo "</PRE>";
nothin shows up for the input type file? (I thought it was in FF and not IE but now it doesnt show in FF either)? Wondering if anyone can explain why its not showing up?
If I do
PHP Code:
echo "<PRE>";
print_r($_FILE);
echo "</PRE>";
then I get information like
PHP Code:
Array
(
[oFile1] => Array
(
[name] => image8.jpg
[type] => image/pjpeg
[tmp_name] => /tmp/phprVw2s6
[error] => 0
[size] => 40241
)
)
so I know its there but if I do
PHP Code:
echo "<img src=\"".$_FILE['oFile1']['tmp_name']."/".$_FILE['oFile1']['name']."\">
nothing shows up?