Forum Moderators: coopster

Message Too Old, No Replies

$ FILES in AJAX

         

ayushchd

5:38 pm on Sep 4, 2007 (gmt 0)

10+ Year Member



I want to send $_FILES elements as arguments of an AJAX function...I trid This

$type = $_FILES["uploaded"]["type"];
$name = $_FILES["uploaded"]["name"];
$size = $_FILES["uploaded"]["size"];
$tmp = $_FILES["uploaded"]["tmp_name"];
?>
<input type="submit" value="Upload" onClick="displaypic('mess', '<?= $name?>', '<?= $size?>', '<?= $tmp?>');">

But as it is its not working.

And then in the file being requested by the AJAX function, i wrote :
$name = $_GET['name'];
$size = $_GET['size'];
$type = $_GET['type'];
echo $name . $size. $type;

But nuthing was echoed.

Can somebody help me out?

d40sithui

6:15 pm on Sep 4, 2007 (gmt 0)

10+ Year Member



i dont see anything wrong with your code so far. can you post the form and the ajax