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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:38:20+00:00 2026-05-22T15:38:20+00:00

I’ve been reading up on PHP lately and Validation of user input is a

  • 0

I’ve been reading up on PHP lately and Validation of user input is a common topic for obvious reasons. I’m not really into the hacking scene, or doing anything malicious but out of curiosity I don’t understand how a malicious user would be able to change POST information. To clarify, here’s an excerpt out of the book I’m reading:

If a user can enter his or her state
free form, then you have exposed
yourself to getting sates like

  • New Yrok (Typo)
  • Lalala (intentionally obscured)

A common tactic used to address this
is to use drop down option boxes to
provide users a choice of state. This
only solves half the problem, though:
You’ve prevented people from
accidentally entering an incorrect
state, but it offers no protection
from someone maliciously altering
their POST data to pass in a
non-existent option.

– “Advanced PHP Programming by George Schlossnagle”

How would one even go about doing this, I understand why to prevent this, but it seems backwards in my logic to prevent something that I don’t fully understand.

Thanks

  • 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-22T15:38:21+00:00Added an answer on May 22, 2026 at 3:38 pm

    You can not assume that the processtheform.php will only get posted data from yourform.html. If they create their own html form on their own system (or anywhere else) they could use that to post to your processtheform.php code.

    If processtheform.php took say a username (email address) which was hidden in the form and used it for sending that person an email then a hacker could potentially change that information and have your program send people spam.

    Basically you can not depend on front end script on yourform.html to make certain the data is clean and sent as it should be. processtheform.php needs to check and clean the data even if your front end code already does it.

    Only advantage to the front end cleaning is it keeps the user on the same page and allows him to enter in correct data before submitting – if that is not done on the front end the user may need to re-enter all his info.

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

Sidebar

Related Questions

No related questions found

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.