Page 1 of 1

Working on 'upload file' form that post results to popup win

Posted: Thu Mar 20, 2003 4:50 pm
by 3dron
My values post properly but then the PHP can't properly get the fielname, size or type.

I use the following javascript:

function submitMe(theForm){
popup = window.open(upload.php,"newwin","scrollbars=no,width=250,height=150,resizeable=no");
document.frm.target = 'newwin';
document.frm.submit();
return true;
}

Which is called by the form action:

<form name="frm" action="upload.php" onSubmit="return submitMe();" ENCTYPE="multipart/form-data">

But when it gets to upload.php it gets an error when trying to copy.

copy("$superdat", $dir.$superdat_name)...
...You've uploaded<?PHP echo $superdat_size; ?>...

It can't seem to get the value of $superdat_name(or $superdat_size). But I don't understand where that value comes from in the first place. Is "_name" some function? And why can't it be performed on the variabale $superdat passed to the new window.

Thanks for any direction

Ron

Posted: Fri Mar 21, 2003 2:17 am
by twigletmac