give description to a file
Moderator: General Moderators
give description to a file
hi anyone,
I really need a help here. I want to give description to a file and upload it to apache server folder. below is the htm form that will 'action' will go to uploadit.php :-
<HTML>
<HEAD>
<TITLE>Upload example</TITLE>
</HEAD>
<BODY>
<form action="uploadit.php" method="post" enctype="multipart/form-data">
Select File to Save : <input type="file" name="thefile"><br>
<hr>
Department : <select size="1" name="Deparment">
<option>Diffusion</option>
<option>Implant</option>
<option>CMP</option>
<option>Q.A</option>
</select>
<p>Description : <input type="text" name="description" size="20"></p>
<p>
<input type="submit" value="Upload"> <b><a href="file://Fileshare/FILE_SHARE/Operation/Fab%20Operation/Diffusion/Equipment%20Engineering/Heated%20line%20project/docu/index.htm">CANCEL</a></b>
</p>
</form>
</BODY>
</HTML>
can someone help me with the uploadit.php side. i really need to know how this can work. thank you in advance.
alfy
I really need a help here. I want to give description to a file and upload it to apache server folder. below is the htm form that will 'action' will go to uploadit.php :-
<HTML>
<HEAD>
<TITLE>Upload example</TITLE>
</HEAD>
<BODY>
<form action="uploadit.php" method="post" enctype="multipart/form-data">
Select File to Save : <input type="file" name="thefile"><br>
<hr>
Department : <select size="1" name="Deparment">
<option>Diffusion</option>
<option>Implant</option>
<option>CMP</option>
<option>Q.A</option>
</select>
<p>Description : <input type="text" name="description" size="20"></p>
<p>
<input type="submit" value="Upload"> <b><a href="file://Fileshare/FILE_SHARE/Operation/Fab%20Operation/Diffusion/Equipment%20Engineering/Heated%20line%20project/docu/index.htm">CANCEL</a></b>
</p>
</form>
</BODY>
</HTML>
can someone help me with the uploadit.php side. i really need to know how this can work. thank you in advance.
alfy
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
please don't cross post.
uploadit.php will receive..
once you get that, you can start placing the post data into a database, or a flat file.. or something..
uploadit.php will receive..
Code: Select all
$_POST['Deparment'] // with the selected index value, whichever that is.
$_POST['description'] // the string from description
$_FILES['thefile'] // if the upload succeeded.- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
cross posting is posting the same, or extremely similar thing in 2 or more forums. You posted this thread, and a thread in "Volunteer Work"
The code I posted was the variables that'd be set on submission to uploadit.php.
The code I posted was the variables that'd be set on submission to uploadit.php.
sorry..my fault
oppss..
that is my fault. sorry to all...never to that again. can anyone please tell me more on the script?
that is my fault. sorry to all...never to that again. can anyone please tell me more on the script?
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
there's plenty of code to add. I'm trying to nudge you the right direction, not do it for you. There are many threads about upload scripts in the past few days in this forum, as well as a (mostly) ready-made script in the "Code Snippets" forum
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
k.. well .. if you want to just toss the description in a text file, then..
Code: Select all
$file = fopen("/same/path/as/where/you/place/the/uploaded/file/".basename($uploaded_file_name).".txt","wb") or die("unable to open description file");
fwrite($file,$_POST['description']);
fclose($file);