title: Multiple forms on one php page not working
body: <p>So I want to add one more form on the page to insert some data in a database, but it is not working at all. Plus, it broke my first form which worked fine before.
  this is the form I want to add:</p>
  <pre><code>&lt;div class=&quot;overlay&quot;&gt;
   &lt;div style=&quot;margin-top:25%;&quot;&gt; &lt;/div&gt;
     &lt;form id=&quot;favForm&quot; class=&quot;favFormClass&quot; action=&quot;&quot; method=&quot;post&quot; enctype=&quot;multipart/form-data&quot;&gt; 
           &lt;input type=&quot;hidden&quot; name=&quot;id_post_fav&quot; value=&quot;&lt;?php echo $row['id_post'];?&gt;&quot; /&gt;
           &lt;button type=&quot;submit&quot; name=&quot;fav&quot; style=&quot;background:transparent; border:none; cursor:pointer;&quot;&gt; &lt;i class=&quot;fa fa-heart&quot; style=&quot;font-size:60px;color:red;&quot; aria-hidden=&quot;true&quot;&gt;&lt;/i&gt;&lt;/button&gt;
      &lt;form&gt;
  &lt;/div&gt; 
  </code></pre>
  <p>and this is the form from the chat area, that worked fine:</p>
  <pre><code>&lt;div class=&quot;chat-box&quot;&gt;&lt;/div&gt;
  
     &lt;form action=&quot;#&quot; class=&quot;typing-area&quot;&gt;
       &lt;input type=&quot;text&quot; class=&quot;incoming_id&quot; name=&quot;incoming_id&quot; value=&quot;&lt;?php echo $user_id; ?&gt;&quot; hidden&gt;
       &lt;input type=&quot;text&quot; name=&quot;message&quot; class=&quot;input-field&quot; placeholder=&quot;Type a message here...&quot; autocomplete=&quot;off&quot;&gt;
       &lt;button&gt;&lt;i class=&quot;fa fa-paper-plane-o&quot;&gt;&lt;/i&gt;&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  <p>I tried applying different id for each one, but still not working. Also, I can see that the second form has action=&quot;#&quot; (the second form is not written by me, that is why it doesn't have button type=&quot;submit&quot; or things like that) and if I put action=&quot;something1&quot; in the first form, it also applies to the second one... Please help</p>