Take the 2-minute tour ×

Hello everyone and thanks in advance. I have a problem and I have 2 form into one another, the domestic form is to perform a file upload. As I can do to make when sending in internal form not run the main form.

<form name="x" method="post" action="xxx.php">

   <form action="" method="post" enctype="multipart/form-data" target="xxx">

      <input type="file" />

      <input type="submit" />


   <iframe id="xxx" src="process.php">

 <input type="submit" name="pro" value="Register user"/ >

Doing this does not work, as this within another form. Any help or possible solution.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

Forms cannot be nested. That's simply is not allowed in HTML and if you do so you might get undefined behavior which could vary between browsers. So try removing the inner form and put the enctype on the outer form.

share|improve this answer
there would be some other solution? –  Alexd2 Sep 23 '10 at 17:18
Solution for what? You never mentioned what is your scenario and what are you trying to achieve. –  Darin Dimitrov Sep 23 '10 at 17:19
the problem is by design, which is why groups that form into another, with a plugin (jQuery or another) could make the ascent of the file, without using another form –  Alexd2 Sep 23 '10 at 17:22
+1 Forms cannot be nested. –  NAVEED Sep 23 '10 at 17:23

Your Answer


