473,499 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

File upload

I cant get my php script to upload a file to the default dir. I have
checked all the php.ini variables and made sure there is a default
temporary dir, as soon as i submit it just reloads the page. this is my
form

<form enctype="multipart/form-data" action="<?php echo
$_SERVER[PHP_SELF]; ?>" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>

please help me! i dont know what to do!

Jul 17 '05 #1
4 1497
the flaw isn't in this part -> the page doesn't reload (i recon) but it
gets posted to itself. Can be a way to do it, but you'll need some php
to handle that.

Assuming your coding is all ok, you also have to make sure that your
permissions are all set to go. Chmod involved dirs and files to 0777,
test it, and if it works, you know the flaw is in that part,,,,,

Jul 17 '05 #2
Well this is mainlly because you forgot to add the necessary php
code:), you may want to read here for more

http://ro.php.net/manual/en/features.file-upload.php

Ovidiu
http://www.DevPlug.com -- Connecting Developers
Jul 17 '05 #3
im not sure what you mean by Chmod the involved dirs and files to 0777,
and i have looked at that handling file uploads page for hours on end.
For the record im running apache 1.3.3 on a win32 machine with 4.3.9 php

Jul 17 '05 #4
yeah jus figured out that chmod is a Unix command. wonder if theres a
similar one for windows.

Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3715
by: Amy Kimber | last post by:
Hello all, ok, I have a file upload secton to my site, two pages, one with a form and one that does the uploading.... some files upload fine, other don't an exe of 300k will upload, but a...
15
3186
by: Simon | last post by:
I would like to create a very basic file upload add image form to add to my web site and to keep them in a "tmp" directory within my web hosting file manager once uploaded. I understand the basic...
3
2833
by: Bijoy Naick | last post by:
I've written a simple file upload user control in VB .NET. It comprises of an InputFile HTML Server Control, an Upload button and a message label. User clicks on the Browse button of the...
1
2745
by: BW | last post by:
I am creating an upload/download function for an extranet site. Files will be uploaded to directory based upon the users login and associated project. The function works as long as I use "c:\Temp"...
6
3028
by: Vic Spainhower | last post by:
Hello, I am trying to do a FTP file upload which works fine on my localhost but on my ISP server it fails. I can't seem to find where I can go to find the specific cause of the failure. In both...
7
3165
by: pbd22 | last post by:
hi. i am having probs understanding how to grab a file being uploaded from a remote client. i am using hidden input fields for upload such as: <input id="my_file_element" type="file"...
2
7625
by: hotflash | last post by:
Hi All, I found the best pure ASP code to upload a file to either server and/or MS Access Database. It works fine for me however, there is one thing that I don't like and have tried to fix but...
3
613
by: shapper | last post by:
Hello, I need to upload a file. Can I only do this with the File Upload control? I also need the following: - Send upload info, upload percentage, continuously to a JavaScript function so...
12
2457
by: GuangXiN | last post by:
I want the file upload element disappear, instead of it, I place a text box and a button with my own css defination. but it doesn't work on IE7. What should I do now? <form action="upload.php"...
0
2811
by: amskape | last post by:
hi Friends, I need to Upload some files in a Listing , by clicking corresponding Upload link, then a popup window will come with Browse option as Shown in attachment File. My actual need is...
0
7132
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7009
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7223
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7390
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5475
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3103
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
302
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.