How do I do so that the image (loading.gif) displayed while I are uploading a file
[code=php]<?php
if(isset($_POST[‘frm_upload’]))
{
if(is_uploaded_file($_FILES[‘frm_file’][‘tmp_name’]))
{
$filetypes = ‘.php, .htm, .html’;
$original_name = $_FILES[‘frm_file’][‘name’];
$file_extension = strrchr(strtolower($original_name), ‘.’);
$types = explode(‘, ‘,strtolower($filetypes));
if(in_array($file_extension,$types))
{
echo “You can’t upload php, htm and html filetypes “;
$check_filename = “false”;
}
else
{
$check_filename = “true”;
}
if ($_FILES[‘frm_file’][‘size’] > 50000000)
{
echo “The file can max be 50mb.<br>”;
$check_filesize = “false”;
}
else
{
$check_filesize = “true”;
}
if($check_filename == “true” && $check_filesize == “true”)
{
copy($_FILES[‘frm_file’][‘tmp_name’], $_POST[‘path’].$_FILES[‘frm_file’][‘name’]);
echo “You have uploaded the file {$_FILES[‘frm_file’][‘name’]}.<br>”;
}
}
}
?>
<form method=”post” action=”up.php” enctype=”multipart/form-data”>
<input type=”file” name=”frm_file”><br>
<select name=”path”>
<option value=”0192837465/<?php echo $_SESSION[‘sess_id’]; ?>/”>Your folder</option>
</select>
<input type=”submit” name=”frm_upload” value=”Upload”>
</form>
I’m from Sweden
sorry for my bad English