I have a form which post to itself and uploads a movie file to a directory. This form has hidden variables. ... These hidden variables in win2k and mac os10 using ie 5.5 and greater get posted and display the same hidden data... In FREAKING XP it does not... What gives. I checked the code, and I can not see the problem.
Code....
error_reporting(1023);
require ("./connect_class.php");
$myconnectme = new connectme();
include ("./resize_images.php");
$mediaFileType = array("1" => "Image Media (JPEG Only)", "2" => "Movie File (MPEG/AVI/MOV)", "3"=>"Flash Movie File");
if (isset($UPLOAD)) {
print "YES";
if (isset($imagefile)) {
if ($imagefile !="none") {
for ($m =0; $m < count($imagefile); $m++) {
if(($imagefile[$m] != "none") && ($imagefile_name[$m] != "")){
//used for adding to db and resizing graphics
$savePath = "$path$directory";
$action = "add";
$NULLVAL = "";
createJpgFiles($imagefile[$m], $savePath, $action, $MediaType, $category,$pid, $imagefile_name[$m],$NULLVAL);
}
}
}
}
elseif (isset($moviefile)) {
$date=date("Y-m-d H:I:S");
if(!opendir("$path$directory/movies/")) {
mkdir("$path$directory/movies",0777);
}
// add check routine to see if a file exist in that dir with this name..
$moviefile_name = ereg_replace(" ", "" , $moviefile_name);
if (file_exists("$path$directory/movies/$moviefile_name")){
$ttime=date("HIU");
$moviefile_name = "$ttime$moviefile_name";
}
copy($moviefile,"$path$directory/movies/$moviefile_name");
chmod("$path$directory/movies/$moviefile_name", 0777);
unlink($moviefile);
//end uploading of movie file
/* the following code is for a direct copy of image to thumbnail and insert into db
the client wants to have a large image and thumbnail - usinig resize_images.php
to create and resize the graphics.
copy($movieImage,"$path$directory/thumbs/$movieImage_name");
$movieImage_name = ereg_replace(" ", "" , $movieImage_name);
if (file_exists("$path$directory/thumbs/$movieImage_name")){
$ttime=date("HIU");
$movieImage_name = "$ttime$movieImage_name";
}
chmod("$path$directory/thumbs/$movieImage_name", 0777);
$status =1;
$insertMedia = "insert into mediafiles (artistid,status,category,mediafilename,mediafilet
ype,add_date,movieStill) values ('$pid','$status','$category','$moviefile_name','$
MediaType','$date' ,'$movieImage_name')";
$insertansrslt = mysql_query($insertMedia);;
unlink($movieImage);
*/
$action = "add";
$savePath = "$path$directory";
createJpgFiles($movieImage, $savePath, $action, $MediaType, $category,$pid, $movieImage_name,$moviefile_name);
}
}
print "<html>\n";
print "<head>\n";
print "<LINK REL=stylesheet HREF=\"../stylesheet.css\" TYPE=\"text/css\">";
print "<title>$artist</title>\n";
print "</head>\n";
print "<body bgcolor=\"#000000\">\n";
if (isset($UPLOAD)) {
print "<h2>Uploaded Files</H2>";
}
print "<form method=\"post\" action=\"addmedia.php\" enctype=\"multipart/form-data\">\n";
print "<input type=\"hidden\" name=\"artist\" value= \"$artist\">\n";
print "<input type=\"hidden\" name=\"pid\" value= \"$pid\">\n";
print "<input type=\"hidden\" name=\"directory\" value= \"$directory\">\n";
print "<input type=\"hidden\" name=\"MediaType\" value= \"$MediaType\">\n";
print "<h2>Upload media files - <a href=edit_artists_details.php?pid=$pid>$artist</a> - ";
for($i = 0; $i < count($mediaFileType); $i++) {
list($key , $val) = each($mediaFileType);
if ($key == $MediaType) {
print "$val</h2>";
}
}
print "<table border=0 align=center width=90%>";
if ($MediaType == 1) {
/*
print category select
print 5 images upload
print active not active
on upload, copy large graphic to images directory for artists (check size)
resize and save smaller graphic and put into thumbnails
upload then go back to edit_artists_details.php
*/
for($l = 0; $l < 10; $l++){
$countEm = $l+1;
print "<tr><td>";
print "IMAGE $countEm </td>";
print "<td><INPUT NAME=imagefile[] TYPE=file></td></tr>\n";
}
print "<tr><td>Category Select:</td><td><select name=\"category\" size=\"1\">";
include("./fun_get_cat_subcat.php");
print "</select></td></tr>\n";
} elseif ($MediaType == 2) {
/*
print category
print still shot input upload box
print active
print browser upload for single file
if artists dir not have movie or swf dir/ create it. (file_exists)
upload then go back to edit_artist_details page
*/
print "<tr><td>Movie Still </td><td><INPUT NAME=movieImage TYPE=file></td></tr>\n";
print "<tr><td>Movie Clip</td><td><INPUT NAME=moviefile TYPE=file></td></tr>\n";
// here is for cateogry again..
print "<tr><td>Category Select:</td><td><select name=\"category\" size=\"1\">";
include("./fun_get_cat_subcat.php");
print "</select></td></tr>\n";
} elseif ($MediaType == 3) {
/*
print category
print still shot input upload box
print active
print browser upload for single file
if artists dir not have movie or swf dir/ create it. (file_exists)
upload then go back to edit_artist_details page
*/
print "<tr><td>Flash Still </td><td><INPUT NAME=movieImage TYPE=file></td></tr>\n";
print "<tr><td>Flash Clip</td><td><INPUT NAME=moviefile TYPE=file></td></tr>\n";
// here is for cateogry again..
print "<tr><td>Category Select:</td><td><select name=\"category\" size=\"1\">";
include("./fun_get_cat_subcat.php");
print "</select></td></tr>\n";
}else {
print " <CENTER><H2> PLEASE SELECT AND ARTISTS FROM THE VIEW ARTIST LINK ABOVE</H2></CENTER>";
}
print "</table><center><input type=\"submit\" value=\"UPLOAD\" name=\"UPLOAD\"><center></form></body></html>";
This code works with uploading everything in Win2k/ ie 6 and on Mac2 9.1 to 10.0 using IE.. On XP when I try uploading movie files, it does not return variables. I have no clue why. Is there a time out routine in XP that I should know of.
Ray