I am working on a codeigniter site, the client has requested that the price columns in a datatable are hidden from view unless a user enters a correct password(which they will give out to clients over the phone).
The obvious way is to make the user login which then reveals a new table/page with prices included.
Can I achieve this via AJAX somehow?, i.e. a dialog box appears, the user enters a password, a request is sent and a new table loads with prices included?
I am a total rookie at Codeigniter, but I am learning everyday, please could someone point me in the right direction?
Thanks
Dan
actually its not really a code igniter issue, more javascript. add a controller function in ci which you call via ajax (a javascript framework like jquery is highly recommended).
to keep it simple you could add the password to the request. the controller function checks the password and if its correct it echos the price.
the javascript code might look something like that: