Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-26-2009, 03:08 PM   PM User | #1
paragchaure
New to the CF scene

 
Join Date: Jan 2009
Location: nagpur
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
paragchaure is an unknown quantity at this point
help in uploading file

Please help me.
I'm facing the problem in php5.2 while uploading the file here is the error

Notice: Undefined index: resume in C:\wamp\www\frames\contact validation\upload_file.php on

same script is executing in php4.4

here is the script for uploading


if($_FILES['resume'])
{
if($_FILES['resume']['size'] < 90000)
{
if($_FILES["resume"]["error"] > 0)
{
echo "Erroe Code : ".$_FILES["resume"]["error"];
}
else
{
/*echo "<br><b>file name : </b>" . $_FILES["resume"]["name"];
echo "<br><b>File Type : </b>" . $_FILES["resume"]["type"];
echo "<br><b>File Size : </b>" . $_FILES["resume"]["size"];*/

move_uploaded_file($_FILES["resume"]["tmp_name"], "./upload/".$_FILES["resume"]["name"]);
/*{
echo "<br>File Uploaded <a href ='./upload/".$_FILES["resume"]["name"]."'>".$_FILES["resume"]["name"]."</a>";
}*/

}
}
}
paragchaure is offline   Reply With Quote
Old 05-26-2009, 03:11 PM   PM User | #2
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,678
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
Try
PHP Code:
if(isset($_FILES['resume'])) 
instead of
PHP Code:
if($_FILES['resume']) 
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 05-26-2009, 03:45 PM   PM User | #3
paragchaure
New to the CF scene

 
Join Date: Jan 2009
Location: nagpur
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
paragchaure is an unknown quantity at this point
I tried this but it is not working
paragchaure is offline   Reply With Quote
Old 05-26-2009, 03:53 PM   PM User | #4
CFMaBiSmAd
Senior Coder

 
CFMaBiSmAd's Avatar
 
Join Date: Oct 2006
Location: Denver, Colorado USA
Posts: 2,711
Thanks: 2
Thanked 251 Times in 243 Posts
CFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the rough
What does a phpinfo(); statement show for the file_uploads setting?

And what does the following show -

PHP Code:
echo "<pre>";
echo 
"POST:";
print_r($_POST);
echo 
"FILES:";
print_r($_FILES);
echo 
"</pre>"
__________________
If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.
CFMaBiSmAd is offline   Reply With Quote
Old 05-26-2009, 03:56 PM   PM User | #5
paragchaure
New to the CF scene

 
Join Date: Jan 2009
Location: nagpur
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
paragchaure is an unknown quantity at this point
it displaing
Array()
only and not the values
paragchaure is offline   Reply With Quote
Reply

Bookmarks

Tags
file, index, move_uploaded_file, undefined index, uplode

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:35 PM.


Advertisement
Log in to turn off these ads.