Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

83
Views
Submit multiple form with one button into database

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

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You mean

 <form action="" method="post"> Different field required for database field entry <input type="hidden" name="form_1" value="Publish"> <input type="hidden" name="form_2" value="Publish"> <input type="submit" name="subbut" value="Publish"> </form>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!