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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:31:28+00:00 2026-05-31T09:31:28+00:00

Say I have one form that changes its content (fields and options) based on

  • 0

Say I have one form that changes its content (fields and options) based on the user’s current state in a multi-state process. Say that it always leads to the same action, which means the action needs to figure out what event occurred and on which entity.

<form action='/somecontroller/someaction' method='post'></form>

What is the most common way of transferring this sensitive data to the controller? I’m reluctant to even suggest hidden fields, as those can be changed by anyone. Two way encryption of some sort which is then decrypted in the action and used to determine the rest, server-side? Perhaps serialize sensitive info, encrypt it, and put it in a single hidden field on the client side of the form, then decrypt and unserialize in the controller?

<?php

$hiddenData = unserialize($this->decrypt($_POST['hiddenData'], SALT));
unset($_POST['hiddenData']);
$data = array_merge($hiddenData, $_POST);
...

Basically – how do I send some data with a form securely without exposing it to outside alterations, that is, without making sure something can go wrong if it is altered? Is there some kind of best practice regarding this?

  • 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-31T09:31:29+00:00Added an answer on May 31, 2026 at 9:31 am

    Interesting question. What I would do is a combination of the following (if sessions are not a solution for you):

    1. employ a AES_256 / modifyed AES_256 crypt/decrypt on a serialized representation
    2. make a MD5 + SALT (or similar) hash of the variables that you could compare with a stored hash to determine if any manipulation took place
    3. use something like the user’s IP as SALT to generate the hashes or for the crypt functions, thus if a user’s IP should change you’ll know that (beware: an IP address might change under some circumstances)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say I have one table called REVIEWS This table has Reviews that customers
Let's say I have one class Foo that has a bunch of logic in
I have one field that I need to sum lets say named items However
I have a form that contains two input textboxes, one called serial and the
Let's say I have a checkbox search form like this: Check all that interests
Let's say that I have a form which runs a stored procedure. This stored
Lets say I have one row with three columns - some buttons on left
Let's say I have one project with the following POM: <groupId>com.mine</groupId> <artifactId>coreJar</artifactId> <packaging>jar</packaging> <version>0.0.1-SNAPSHOT</version>
A simple example: Let's say I have one alias being sourced somewhere as: alias
Let's say I have two models, Classes and People. A Class might have one

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.