Hi,
I have this problem with my upload script. The file get postet but not uploaded. I have tried the same script at two different webservers with a max_upload of 12 MB and max_post of 12 MB.
The problem is that I can only upload files up to 100 kb.
Here is my code:
<?
session_start();
require_once '../dbconnect.php';
$beskriv=$_REQUEST["beskrivelse"];
$target_path = "../siteimg/";
//Hent filtype (JPG, GIF m.v.)
$temp_filename = basename( $_FILES['uploadedfile']['name']);
$ext = explode('.',$temp_filename);
$ext = $ext[count($ext)-1];
mysql_query("INSERT INTO siteimg (Type, Navn, Dato) VALUES ('".$ext."', '".$beskriv."', '".date("Y-m-d H:i:s")."')");
$Lastinput=mysql_insert_id();
$target_path = $target_path . $Lastinput . "." . $ext;
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
header("Location: index.php?ref=ub&status=ok");
} else {
mysql_query("DELETE FROM siteimg WHERE ImgID =".$Lastinput);
header("Location: index.php?ref=ub&status=fejl");
}
?>
The file type (jpeg or gif) gets into the db, so therefore the POST must work.
I have tried with different files, to insure that it is not a broken file.
Any ideas?