Here is an example of how the form is, it is much more complex than that, it already has almost 10 years of use and I do not have time to modify everything. But I need to have access to the form that is inside the other, that is the form that is with the id = 'form2'.
<form action='pagina1.php' method='post' id='form1'>
<input type='text' name='teste' value='teste'>
<input type='submit' name='enviar' value='enviar'>
<form action='pagina2.php' method='post' id='form2'>
<input type='text' name='teste' value='teste'>
<input type='submit' name='enviar' value='enviar'>
</form>
</form>
Ways I've tried to access this form to submit it:
Does anyone know why this is happening and how to solve this problem?