Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6249285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:12:33+00:00 2026-05-24T13:12:33+00:00

I have a page with multiple forms (2 forms) on that page. There is

  • 0

I have a page with multiple forms (2 forms) on that page.

There is a callup form and a contacts form in the footer of the page.

So customers may choose to just enter a phone nr and press submit in one form, or they may fill in the other form with name, email, and a message and then press submit.

I am working on a PHP mail() function to separate which form is beeing submitted, however I have forgot alot of programming over the last time, so I turn to you again in asking what to do here.

How can I in the PHP code separate which form has been submitted?

This is what I have in the php right now:

$type = $_POST['type'];

    if($type == 'callup'){
        $tel_nr = $_POST['tel'];

        $to     =       'info@domain.se';
        $subject    =   'Call customer';
        $message    =   'Client telephone nr is '.$tel_nr.'.';
        $message    .=  '\n';
        $message    .=  'Client signed in at this date and time: '.date('Y-m-d').' Time: '.date('H:m:s').'';

        mail($to, $subject, $message);

    }

Basically what I want to do is to send an email to myself when customer submits a form. But depending on which form customer submits, I want to send the corresponding email.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:12:34+00:00Added an answer on May 24, 2026 at 1:12 pm

    Use multiple names for submitting:

    In your first form:

    <input type="submit" name="address" value="Submit Address" />
    

    In your second form:

    <input type="submit" name="zipcode" value="Submit Zipcode" />
    

    Then, serverside, check for the available names:

    if (isset($_POST['address'])) {
        // ...
    } else if (isset($_POST['zipcode'])) {
        // ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page with multiple forms that I submit via Ajax POSTs serially.
I have a form on an HTML page with multiple submit buttons that perform
I have a form page that posts to another page where multiple fields as
So I have multiple forms on a page. Each form is identical except for
I have a page which dynamically creates multiple forms, each form had a unique
I have a page that creates multiple forms for each object that I had
I have multiple forms on a page, for each of them I want the
Imagine the scenario you have a listing page that is a concatenation of multiple
I have a page with multiple forms within it. What I want is, obtain
I have an aspx page that contains regular html, some uicomponents, and multiple tokens

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.