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 846977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:42:19+00:00 2026-05-15T06:42:19+00:00

Why do I need the name and id attributes for <input> form elements? Which

  • 0

Why do I need the name and id attributes for <input> form elements?

Which is used for POST data sending and which can I exclude?

  • 1 1 Answer
  • 1 View
  • 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-15T06:42:20+00:00Added an answer on May 15, 2026 at 6:42 am

    name is used by the server-side. This is necessary if you plan to process the field. id is only so label elements, when clicked and accessed by screen-readers, can trigger/invoke the form controls (inputs and selects).

    <form method=POST action="form-processor.php">
        <input name=first_name value=john>
    </form>
    

    results in

    $_POST = array('first_name' => 'john');
    

    If the method is GET, it’s appended to the query string:

    http://site-name.com/form-handler.php?first_name=john

    It’s popular for query string appending with hidden inputs:

    <input type="hidden" name="q" value="1">

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need send certain attributes(say, human readable user name) from server to client after
Which name need the sql-file in the sql folder? When I want to load
I need to extract name from a big data pouch . $frame = '\Amy
I need to create an input form that will allow a user to enter
I am working with input elements in a form using jquery...I am trying to
These are the steps: POST Form (file/image input) from the browser goes to a
I'm trying to use CakePHP's form helper to generate some input elements. The HTML
I have a form where the name attributes get updated , but the problem
I've got a form on a website with a bunch of input elements. The
I have a form which has a textbox with the name attribute username and

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.