I have an upload form on my site, which will display either the image or file name on the form submission confirmation.
It works fine in IE but doesn't display anything when using Firefox. From what I understand, Firefox blocks local files as a security feature.
Here's my code for grabbing the uploaded file info:
PHP Code:
<?
$s_path = "incoming/";
....
for ($i = 1; $i < 4; $i++) { //cycle for small images
$result = ProcessUploadedFile($i, true);
if ($result !== true) {
echo ' ';
} else {
echo 'Your file was uploaded successfully! You will also receive an e-mail confirmation of your successful file upload status for your records. </br>';
echo "<br>";
//Grabbing image info from the server
$image = $_FILES["s_userfile1"]["name"];?>
Displaying the file info:
PHP Code:
<?php
//if it's an image statement:
echo '<img src="';
echo '/';
echo $s_path;
echo $image;
echo '"><br><br>';
//if it's not an image statement:
echo "We have received your file: <strong><font color='#FF0000'>";
echo $image;
echo "</font></strong><br><br>[<a href='javascript:window.close();'>Close window</a>]";
?>
Does anyone know a workaround or what I am doing wrong in the above code?
Thanks in advance!