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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:01:56+00:00 2026-05-15T19:01:56+00:00

Let say I have a post from like this: <form action=myApp/form_action.asp method=post> First name:

  • 0

Let say I have a post from like this:

<form action="myApp/form_action.asp" method="post">
  First name: <input type="text" name="fname" /><br />
  Last name: <input type="text" name="lname" /><br />
  <input type="submit" value="Submit" />
</form>

So, let say there is a really bad buy who want to do something in my application. For example, my form_action.asp not only accept param “fname”, “lname”, but also “gender”, can he/she make a request on their own , like this….

<form action="http://www.myDomain.com/myApp/form_action.asp" method="post">
  First name: <input type="text" name="fname" /><br />
  Last name: <input type="text" name="lname" /><br />
  Gender: <input type="text" name="gender" /><br />
  <input type="submit" value="Submit" />
</form>

****Updates:****
I don’t want the user submit the gender, because I don’t want to modify his/her gender after he/she assigned.

If he/she can submit this query, it there any way to avoid him/her to do so? thank you.

  • 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-15T19:01:58+00:00Added an answer on May 15, 2026 at 7:01 pm

    You’re thinking about this the wrong way. Forget about HTML forms. They’re not what your server handles. It handles HTTP requests.

    And (pretty obviously) people can send you HTTP requests that contain whatever they want. Not just additional fields, but also fields with values that the form would not allow, or fields with names that are 5000 characters long and/or values that are that long.

    So what you absolutely must do is define what constitutes valid input and reject input that isn’t. In your case, it’s pretty simple: if the form is not supposed to contain a “gender” field, then have the server ignore such a field, or abort with an error if it’s present.

    Usually you don’t have to do anything to ignore fields. But you definitely have to write your app in such a way that it does not accept field values that are not valid.

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

Sidebar

Related Questions

Let's say I have an Ajax call from jQuery like this: $.ajax({ url: myUrl,
Let's say I have this code: if (md5($_POST[$foo['bar']]) == $somemd5) { doSomethingWith(md5($_POST[$foo['bar']]); } I
Let's say I have the following jQuery AJAX call: $.ajax({ type: POST, url: MyUrl,
Let's say I have some models: User , Post , and Vote . A
Let's say we have a service to add a new hotel: > POST /hotel
Let's say we have a continuous integration server. When I check in, the post-hook
Let say I have abstract class called: Tenant and Customer. The tenant in this
Let say I have an array like: Array ( [0] => Array ( [Data]
let say i have function like below function doSomethingNow(){ callSomethingInFutureNotExistNow(); } at the moment
Let's say I have this code: class Score { public Update(int score) { update

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.