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
<form enctype="multipart/form-data" method="post" action="http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'].'">
<input type="file" name="filename" size="30" />
<input type="submit" name="submit" />
mosMail($_POST['*request_email'], $_POST['*request_name'], email@example.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
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
then I get information like
[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
echo "<img src=\"".$_FILE['oFile1']['tmp_name']."/".$_FILE['oFile1']['name']."\">
nothing shows up?