Hi all i'm trying to send a request from an html form in which i'l provide emp id, uname, and basic salary amount. I want it to be stored in the salary table which contains empid, uname, b salary, hra, ta,da,gross,pf,net sal. can i use session in which it shoul first calculate vlues and store into database and should redirect the user and display salary slip onto the next page where the calculated amount will be called from a salary table and will be displayed in a desired format? Many thanks!!!
Please read this article for a discussion of the best practice flow of control in web apps.
The session is sometimes used to preserve the data across a redirect using the PRG pattern, but it's not always the best way. Usually, in the PRG pattern, the data will be re-pulled from the database via the page controller of the redirect target. There usually isn't a need for the session except when it's been proven that caching data in the session solves a demonstrable performance issue.