- Code: Select all
<form method="post" name="myForm" enctype="multipart/form-data"/>
<div class="wrapper">
<label class="label">Name :</label>
<input type="text" name="fname" id="fname" class="wrap-input" size="65"/>
</div>
<div class="wrapper">
<label class="label">Logo :</label>
<input type="file" name="logo" />
<input type="button" name="uploadcontent" value="Upload"/>
</div>
<div class="wrapper">
<label class="label">Email :</label>
<input type="text" name="email" id="email" class="wrap-input" size="65"/>
</div>
<div class="wrapper">
<label class="label">Phone :</label>
<input type="text" name="phone" id="phone" class="wrap-input" size="65"/>
</div>
<div class="wrapper">
<label class="label">Upload Content (.doc, pdf, images) :</label>
<input type="file" name="content" />
<input type="button" name="uploadcontent" value="Upload"/>
</div>
<div class="wrapper">
<label class="label"> </label>
<input type="submit" name="save" value="Save"/>
</div>
</form>
I found this pretty good site to upload file without refreshing the page but this is for a single input only meaning it works only if you only have 1 input file in each form. See this link:
http://www.ajaxf1.com/tutorial/ajax-fil ... orial.html
But my form has an input texts and 2 upload file button. Any idea how would i do it using the script that i found in the web?
I need this form, that everytime the upload button is clicked it will upload the file into the directory that i assigned so that once i submit the form it will just automatically save the form data to the database, no need for me to have the upload function.This way, the form submission would be much faster.
Give me some idea guys.. please? thank you

