Jump to content

[SOLVED] Notice: Use Of Undefined Constant User - Assumed


kickoutbettman

Recommended Posts

I'm trying to have a little upload/thumbnail script.

But I get to this error (upload to the first directory seem to be working, but for some reason it doesn't get the fyle type)

 

Notice: Use of undefined constant userfile - assumed 'userfile' in E:\Website\desrosiers-auto\test2.php on line 11

Notice: Use of undefined constant name - assumed 'name' in E:\Website\desrosiers-auto\test2.php on line 11

upload/test/large/10008_tapis_7.jpg

Notice: Use of undefined constant userfile - assumed 'userfile' in E:\Website\desrosiers-auto\test2.php on line 13

Notice: Use of undefined constant tmp_name - assumed 'tmp_name' in E:\Website\desrosiers-auto\test2.php on line 13

Successfully uploaded the mage

Notice: Use of undefined constant userfile - assumed 'userfile' in E:\Website\desrosiers-auto\test2.php on line 23

Notice: Use of undefined constant name - assumed 'name' in E:\Website\desrosiers-auto\test2.php on line 23

Notice: Use of undefined constant userfile - assumed 'userfile' in E:\Website\desrosiers-auto\test2.php on line 25

Notice: Use of undefined constant type - assumed 'type' in E:\Website\desrosiers-auto\test2.php on line 25

Notice: Use of undefined constant userfile - assumed 'userfile' in E:\Website\desrosiers-auto\test2.php on line 25

Notice: Use of undefined constant type - assumed 'type' in E:\Website\desrosiers-auto\test2.php on line 25

Your uploaded file must be of JPG or GIF. Other file types are not allowed

 

 

#09-<?php
#11-$add="upload/test/large/".$_FILES[userfile][name]; 
#12-if(move_uploaded_file ($_FILES[userfile][tmp_name],$add)){
#13-echo "Successfully uploaded the mage";
#14-chmod("$add",0777);
#15-
#16-}else{echo "Failed to upload file Contact Site admin to fix the problem";
#17-exit;}
#18-
#19-$n_width=100; // Fix the width of the thumb nail images
#20-$n_height=100; // Fix the height of the thumb nail imaage
#21-
#22-$tsrc="upload/test/thumb/".$_FILES[userfile][name]; // Path where thumb nail image will be stored
#23-//echo $tsrc;
#24-if (!($_FILES[userfile][type] =="image/pjpeg" OR $_FILES[userfile][type]=="image/gif")){echo "Your #25-uploaded file must be of JPG or GIF. Other file types are not allowed<BR>";
#26-exit;}
#27-?>

 

Thank you for your help

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.