Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simultaneous file upload and post variables?

Status
Not open for further replies.

GregArtemides

Programmer
May 23, 2003
12
CY
I'm looking for a way to do http file upload and post file information to the database at the same time. Basically I have a form that has a browse button to allow the user to choose a file, and then some textfields where the user will be entering information about the file, for example a short description. Then I want a submit button which when pressed will simultaneously do the file upload and submit the info from the textfields into the database. Any ideas how I can do this?
 
thats possible.
this is a typical upload form:
<form name=&quot;asd&quot; method=&quot;post&quot; enctype=&quot;multiple/form-data&quot;>
<input type=&quot;file&quot; name=&quot;upload&quot;>
<input type=&quot;text&quot; name=&quot;txt&quot;>

in php
<?
$file=$_FILES['upload'];
$txt=$_POST['txt'];
?>

u can use both together...


Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top