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

  • SEARCH
  • Home
  • 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 7174867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T16:09:12+00:00 2026-05-28T16:09:12+00:00

<form action=here.php method=POST> <input type=text name=text> <div id=one> <input type=hidden name=aaa value=one> <input type=submit

  • 0
<form action="here.php" method="POST">
<input type="text" name="text">

<div id="one">
   <input type="hidden" name="aaa" value="one">
   <input type="submit" value="Send">
</div>

<div id="two">
   <input type="hidden" name="aaa" value="two">
   <input type="submit" value="Send">
</div>

</form>

Now if i click on Send of div ONE or div TWO i have always in $_POST[‘aaa’] = ‘two’;

Is possible make one form with two submit with different values?

If i click on div one submit i would like reveice $_POST[‘aaa’] = ‘one’ and if i click on div two submit i would like receive $_POST[‘aaa’] = ‘two’.

How can i make it?

I can use for this PHP and jQuery.

EDIT:
I dont want create two form – i dont want showing two many times <input type="text" name="text">

EDIT: maybe i can instead button submit ? but how?

  • 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-28T16:09:13+00:00Added an answer on May 28, 2026 at 4:09 pm

    It seems that what you actually want to do is have a value in each of the buttons, see this, for example:

    <form action="demo_form.asp" method="get">
      Choose your favorite subject:
      <button name="subject" type="submit" value="fav_HTML">HTML</button>
      <button name="subject" type="submit" value="fav_CSS">CSS</button>
    </form>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<form method = post action = <?php echo $_SERVER['PHP_SELF']; ?> /> Username:<input type =
I have a form input consisting of two radiobuttons, for one name, as below:
I have a form action that needs to have its value set from a
is it better to do this (regarding performance, not readability...): $('a.updateCartButton').click(function() { $('form[name=updateCartForm]').attr('action', $(this).attr('href')
I have an action handling a form post, but I want to make sure
I have a text input which has a default value password. When the user
i have form action file in another directory but some file send to this
it it possible to get the form action of a GET form on submit
Given some typical search form, I can't construct this form action when submitting a
So a form is submitted on my site, with form action equal to itself.

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.