[eluser]Unknown[/eluser]
Hi,
I have written a web app that pulls displays a quiz.
I echo out the multiple choice options in a view ("quiz"). Each question is dynamic and has a different correct answer each time.
When a user clicks to go to the "results" controller and subsequent view I'd like to present the results. For this I need some way of passing the true answer to the controller. I cannot do this through the form values as that would give away the answer in the source.
I access some other question information in the mark controller using the information posted from the form. However, if I try to secretly pass the correct answer back using PHP then when I try and access and print it out it is empty???
Code:
$_POST['answer1'] = "dog";
This is what I use to set the $_POST in PHP can anyone tell me how I can set the data without it being cleaned out (by CI I assume) or another easy way of doing this (no sessions, cookies please) with $_POST data?
Thank you!