I have this problem to solve in PHP :
This is a simple textarea form
echo "<form action=\"test.php\" method=\"post\">";
echo "<textarea name=\"sometext\" rows=\"10\" wrap=\"virtual\" cols=\"7\">".$sometext."</textarea>";
echo "<input type=\"submit\" value=\"Submit\">";
echo "</form>";
And, I want to display AFTER this form, a file upload input, and AFTER it, the Submit button for the first one, like that :
// the text area
echo "<form action=\"test.php\" method=\"post\">";
echo "<textarea name=\"sometext\" rows=\"10\" wrap=\"virtual\" cols=\"7\">".$sometext."</textarea>";
//the file upload file fields
echo "<form method=\"post\" enctype=\"multipart/form-data\" action=\"someupload.php\" >"
."<INPUT TYPE=\"hidden\" name=\"MAX_FILE_SIZE\" value=\"50000\">"
."<input type=\"file\" name=\"userfile\">"
."<input value=\"Upload\" type=\"submit\">"
."</form>"; //end for upload FORM
echo "<input type=\"submit\" value=\"Submit\">";
echo "</form>";//end for first FORM
This is the FORM inside FORM and doesn't work at all.
How should I resolve, with this order display list of elements
- text area
- upload fields
- submit button for first form
Thanks,
?