02-25-2008, 02:47 AM
|
#2 (permalink)
|
|
The Contributor
Join Date: Feb 2008
Location: Croatia
Posts: 90
Thanks: 4
|
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.
|
|
|