fileupload with $.post
fileupload with $.post
hi hi im trying to upload a file... but not working my code is:
-
$(document).ready(function()
{
$("#upload").submit(function()
{
$("#msgbox").removeClass().addClass('messagebox').text('Überprüfe...').fadeIn(1000);
$.post("takeupload.php",{
MAX_FILE_SIZE:$('#MAX_FILE_SIZE').val(),
file:$("#file").val(),
name:$("#name").val(),
nfo:$("#nfo").val(),
poster:$("#poster").val(),
descr:$("#descr").val(),
stripasciiart:$("#stripasciiart:checked").val(),
type:$("#type option:selected").val() },
function(data){
alert("Data Loaded: " + data);
});
return false;
});
});
-
file:$("#file").val(),
the file to upload
-
<input type="file" name="file" id="file" size="70">
my upload input
takeupload.php
-
<?
if (!isset($_FILES["file"]))
die("file not set");
echo "works";
?>
i've got everytime "file not set" so is $_FILES["file"] not set
plz help me =)