im trying to insert data into database with two different form into two different tables with single button. Both Form are in same page.
Form-1 (inserts data in table-1)
if(isset($_POST['form_1'])){
Insert Query with condition
}
<form action="" method="post">
Different field for requried for database field entry
<input type="submit" value="Publish" name="form_1">
</form>
Form-2 (inserts data in table-2)
if(isset($_POST['form_2'])){
Insert Query with condition
}
<form action="" method="post">
Different field for requried for database field entry
<input type="submit" value="Publish" name="form_2">
</form>
As we can see, i have used post method for form submission, it insert user input data into database with:
isset(isset($_POST[‘submit name’]))
i have used different submit button for inserting data, i want use single button to insert user input into database which table are different
How can i use single button to submit the data to two different table