I’d like to pass sql query from one page to another page. I’d like to do this without security risk. İf i pass the query with get or post method it cause big security problems.
My aim is that:
I have a page that have some input boxes to search in data. When i click to button. It lists the records into a table. I want to present this table in another page without searching it again.
I think that i can do it using session variable but i dont think it is good way though.
How should i do that without security risks?
What if somebody execute this
Don’t pass your query as a querystring value. You can post your input fields state / value to another form and you can build the query there after sanitizing/verifying the input.
Your approach is open for SQL injections. You should better be taking care of that.
http://www.unixwiz.net/techtips/sql-injection.html