Reply
Uploading Code
Old 07-02-2004, 12:11 AM Uploading Code
Novice Talker

Posts: 5
Hello, does anyone know where a good file uploading code can be found?
I want to set up a page on my site where people can upload their photos to my server.
Acutally I want them to have a photo and a few lines of text and upload it to me from the site. Maybe a form? I am not sure.
Thanks in advance for your help.
patyoung is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 07-02-2004, 12:27 AM
dbzguy's Avatar
Ultra Talker

Posts: 345
Location: Artic
put this in the php forum. thats is probably the easiest way to do a file upload
__________________
W3 Dynamic Webhosting-Great Hosting, great service, GREAT PRICES!

PHP Code:
<?PHP if(ping == true) { attackuserip(); } ?>
dbzguy is offline
Reply With Quote
View Public Profile Visit dbzguy's homepage!
 
Old 07-02-2004, 04:57 AM
Unknown.

Posts: 1,693
As dbzguy said you will need to use PHP

Its not possible just through HTML

-James
Dark-Skys99 is offline
Reply With Quote
View Public Profile
 
Old 07-02-2004, 07:57 AM
Experienced Talker

Posts: 43
The following is an example file upload form:

HTML Code:
<form enctype="multipart/form-data" action="upload.php" method="post">
    <input type="hidden" name="MAX_FILE_SIZE" value="100000" />
    Choose a file to upload: <input name="userfile" type="file" />
    <input type="submit" value="Upload File" />
</form>
------------------------------------
upload.php:

PHP Code:
<?php
$uploadDir 
'/var/www/uploads/';
$uploadFile $uploadDir $_FILES['userfile']['name'];
print 
"<pre>";
if (
move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadFile))
{
    print 
"File was successfully uploaded.\n";
}
else
{
    print 
"Error\n";
}
print 
"</pre>";
?>
alexdio is offline
Reply With Quote
View Public Profile Visit alexdio's homepage!
 
Old 07-02-2004, 08:25 AM try Snapfiles!
Mooofasa's Avatar
Defies a Status

Posts: 1,612
Name: Michael (mik) Land
Location: England
go to the freeware section of the below
:

http://www.snapfiles.com/
or
http://www.webattack.com/

Mooofasa is offline
Reply With Quote
View Public Profile Visit Mooofasa's homepage!
 
Reply     « Reply to Uploading Code
 

Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.13280 seconds with 12 queries