Page 1 of 1

Using PHP to upload

Posted: Thu May 11, 2006 11:20 am
by tonyacunar
Hello, I want users to be able to upload images to my server. I tried using the code from the PHP manual website but my servers PHP log catches a syntax error where there is none. I have a folder called images, and my apache/php is set to accept files. Here is the code perhaps you guys have any tips or another tutorial.
thanks

this is my first file, i dont think it has anything wrong with it
index.html

Code: Select all

<form enctype="multipart/form-data" action="uploader.php" 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>

Posted: Thu May 11, 2006 11:26 am
by Burrito
Moved to code and added code tags.

please use code tags when posting code in the forums.

edit:
was there a quesiton wrapped up in there somewhere?

Re: Using PHP to upload

Posted: Fri May 12, 2006 2:21 am
by jmut
tonyacunar wrote:Hello, I want users to be able to upload images to my server. I tried using the code from the PHP manual website but my servers PHP log catches a syntax error where there is none. I have a folder called images, and my apache/php is set to accept files. Here is the code perhaps you guys have any tips or another tutorial.
thanks

this is my first file, i dont think it has anything wrong with it
index.html

Code: Select all

<form enctype="multipart/form-data" action="uploader.php" 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>
could you elaborate on your PHP log. It is hard to believe it just reads error...without any detail.

Posted: Fri May 12, 2006 5:37 am
by $phpNut
Are you asking for the php, that uploads it file (or really moves it from temp file to your directory)?

Posted: Fri May 12, 2006 5:47 am
by JayBird
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:3. Do not make multiple, identical posts. This is viewed as spam and will be deleted.