I am trying to set one form into another in my html document like this:
<form1 action="1.php">
some form elements
...................
<form2 enctype="multipart/form-data" action="upload.php" target="upload_target" onsubmit="startUpload();>
<input name="myfile" type="file"/>
<input type="submit" name="submitBtn" class="sbtn" value="Upload" />
</form>
</form>
<iframe id="upload_target" name="upload_target" src="#"></iframe>
The first form gets data from user and inserts into my database. The second form makes file upload with jquery and iframe like in this example : upload file with iframe and jquery
I am trying to upload file in such way because I cant do it by simply transfering data to php file with javascript(with ajax). And the problem is that nested forms are not supported by w3c standards. What can I do to solve this problem? Thanks for help and sorry for my poor english.