that lets my visitors upload files to my site, please help me.
I have already tried doing it myself for three hours.
I need The code (and instructions) for making a thing (read)
You'll need something server side, probably php.
google it
try php file uploader or something, you can find pre-made ones, or write your own if you know or want to learn php.
google it
try php file uploader or something, you can find pre-made ones, or write your own if you know or want to learn php.
| snowboardalliance wrote: |
| You'll need something server side, probably php.
google it try php file uploader or something, you can find pre-made ones, or write your own if you know or want to learn php. |
I would google it, but I have already spent three hours doing that and I got nothin ><_><
| venc wrote: | ||
I would google it, but I have already spent three hours doing that and I got nothin ><_>< |
www.hotscripts.com can help
ok, thanks, I will try, but I just spent anothe I dunnno how long googeling, so, I just really hope this works
I think I found it dude!!!!!! I really owe you!!!!!!!!!!! my three+ hours of searching still didnt pay off, but I found it!!!!*goes insane* i found it i found it i found it i found it.......
damn it, I just spent three hours trying to get it to work, yet it doesnt, I need someone to install it and test it for me, and volunteers?
An extremely basic piece of code to upload files is....
"upload/" is the name of the folder where you want files to be uploaded to. This has to have the CHMOD 777.
You then need a form. Again, the below code will make an extremely simple form:
PS - I have not tested this code so whether it works or not I do not know.
| Code: |
| <?php
if(!(copy($_FILES['userfile']['tmp_name'], "upload/" . $_FILES['userfile']['name']))) die("Cannot upload files."); echo "Upload Complete!"; ?> |
"upload/" is the name of the folder where you want files to be uploaded to. This has to have the CHMOD 777.
You then need a form. Again, the below code will make an extremely simple form:
| Code: |
| <form action="upload.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000"> <INPUT TYPE=file VALUE="C:"> Select a file <input type="file" name="userfile"><br> <input type="submit" value="Upload!"> |
PS - I have not tested this code so whether it works or not I do not know.
ok, thanks! I will try it.
it still didnt work. I really need help =(
| venc wrote: |
| it still didnt work. I really need help =( |
Did you name the file upload.php and place it in the same directory as the page where you want users to upload from ?
To make myself clearer....
Save the following as upload.php
| Code: |
| <?php
if(!(copy($_FILES['userfile']['tmp_name'], "upload/" . $_FILES['userfile']['name']))) die("Cannot upload files."); echo "Upload Complete!"; ?> |
Create a page in the same directory where you want users to go to to upload files and use the following code...
| Code: |
| <form action="upload.php" method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="1000000"> <INPUT TYPE=file VALUE="C:"> Select a file <input type="file" name="userfile"><br> <input type="submit" value="Upload!"> |
This can have any filename. If you wish to place the form in a seperate place then make sure you change the action="upload.php"
Next create a folder named upload in the same directory where the upload.php and the form os located. CHMOD this to 777.
--- I have just tried this and it worked for me
P.S - Please do not post another thread on the subject, it is not needed. It has now been trashed.
ok, thanks, that is much clearer, I will go try it now
it would work, but it show 2 upload forms, not one, but two, can you fix that?
can you put the files on my site and make it work properley, if you will, pm me. I want you to because I just cant, because some how, even when I follow the exact instructions, it screws up on me
go to www.zymic.com and look in there tutorials they have a good upload script but u need to set the permissions for the file uploading . if you have any trouble with this email me at " evo@gfx-spot.com " and i will help you.
okay, thanks
