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

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
3dron
Forum Commoner
Posts: 40
Joined: Sat Feb 01, 2003 10:25 pm

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

Post 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
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Post Reply