Is There A Way To Add Variable To The Session Data
Posted 21 July 2012 - 12:06 AM
I have just written a contact form but it is still not particularly secure. I want to add a variable to the form that gets checked against the session data so that I am sure the request has actually come from a page on my site.
Is there a way to add data to the session in that manner?
The only alternative I can think of is to create a new table and write the variable to the table, but that seems a lot of work, deleting all the old entries etc and seems more efficient to add it to the session data.
This may not be the right way to go about this but without it I don't want to post the snippet to the library.
I only really learned about this using codeigniter, where it kindly takes care of doing all that for you, adding the hidden fields and the session data and checking it automatically - which has proved very handy.
Thanks in advance,
Posted 07 August 2012 - 08:00 AM
Sorry for the late responce, am in Denmsrk for vacation
I think there should be a way you can get the session number.
that way you should be able to se a hidden imput parameter with the session number.
I have to think about the session check though, but that should not be to complicated, if you can be sure the serverside can read the session to, and know what sessions it has running.
Still could be tricky
Posted 07 August 2012 - 12:59 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users