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:
<div class="overlay">
<div style="margin-top:25%;"> </div>
<form id="favForm" class="favFormClass" action="" method="post" enctype="multipart/form-data">
<input type="hidden" name="id_post_fav" value="<?php echo $row['id_post'];?>" />
<button type="submit" name="fav" style="background:transparent; border:none; cursor:pointer;"> <i class="fa fa-heart" style="font-size:60px;color:red;" aria-hidden="true"></i></button>
<form>
</div>
and this is the form from the chat area, that worked fine:
<div class="chat-box"></div>
<form action="#" class="typing-area">
<input type="text" class="incoming_id" name="incoming_id" value="<?php echo $user_id; ?>" hidden>
<input type="text" name="message" class="input-field" placeholder="Type a message here..." autocomplete="off">
<button><i class="fa fa-paper-plane-o"></i></button>
</form>
I tried applying different id for each one, but still not working. Also, I can see that the second form has action="#" (the second form is not written by me, that is why it doesn't have button type="submit" or things like that) and if I put action="something1" in the first form, it also applies to the second one... Please help