File Upload in Website using ASP or HTML or PHP

Status
Not open for further replies.

satyamy

Alive Again...
Hello Friends
I need to make a File Upload Section in Website

I need to make 1 Text Box (which days Description)
and one browse button (which browse the file)
and one Submite Button

when Someone Click submit button it will take some time to upload the file and after this it will give a Link to download that File

I searched google and Found :D

*www.15seconds.com/issue/001003.htm :)

But not understanding how to setup this in Website because i dont know ASP :(

I have 2 sites with hosting from techiehost.org and host4cheap.org

Can anyone help ? :-?

Or if any one has any simple file upload method than Pls tell :)
 

jaya

Broken In
Example File Upload Form using php

A file upload screen can be built by creating a special form which looks something like this:

<form enctype="multipart/form-data" action="jaya_upload.php" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
<!-- Name of input element determines name in $_FILES array -->
Upload file: <input name="userfile" type="file" />
<input type="submit" value="Upload" />
</form>

jaya_upload.php code is
<?php
// In PHP versions earlier than 4.1.0, $HTTP_POST_FILES should be used instead
// of $_FILES.

$uploaddir = 'uploads/';
$uploadfile = $uploaddir . basename($_FILES['userfile']['name']);

echo '<pre>';
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "File is valid, and was successfully uploaded.\n";
} else {
echo "Possible file upload attack!\n";
}

echo 'Here is some more debugging info:';
print_r($_FILES);

print "</pre>";

?>
 

Choto Cheeta

Rebooting
with all do respect to jaya...

@satyamy

rather than custome script why dont you try a readmade free or paid script and modify it according to ur needs ???

*www.hotscripts.com/PHP/Scripts_and_Programs/File_Manipulation/Upload_Systems/index.html

:)
 
Status
Not open for further replies.
Top Bottom