View Single Post
Old 02-25-2008, 02:47 AM   #2 (permalink)
abiko
The Contributor
 
abiko's Avatar
 
Join Date: Feb 2008
Location: Croatia
Posts: 90
Thanks: 4
abiko is on a distinguished road
Default

Try this code:

PHP Code:
if($adtype == 'O'){
// HERE's MY UPLOAD
            
$newfilename "../ads/$adid.$imagetype";
            
$picfile $HTTP_POST_FILES['userfile']['tmp_name'];
    if ( 
move_uploaded_file$picfile$newfilename) ) {
            
printf("Ad uploaded<br>");
    } else {
            
printf"Ad not uploaded");
   }


Also:

PHP Code:
   if (!empty($adimagefile)) 
or
PHP Code:
      if (isset($adimagefile)) { 
see how this works for you.
Did you try
PHP Code:
print_r$_POST ); 
to see is the $_POST variables are all there?
Can you tell us how does it work. is this the upload-add script or?
__________________
Back from sysadmins to the programmers.
Send a message via ICQ to abiko Send a message via MSN to abiko
abiko is offline  
Reply With Quote