Welcome Guest, Not a member yet? Register   Sign In
Controller question
#1

[eluser]Joozt[/eluser]
We are building a windows application witch connects to a (web) server using URL's.

The thing is you have to be logged in to use controllers, so the idea is to build a login module witch checks username and password and creates a SessionID, witch is stored in the database with the username.

So when running some other function the URL will always be: base_url()/Controller/function/username/sessionID/functionVariable/

But i don't want build every controller function with 2 variables called $username and $sessionID I just want the controllers to start picking there variables from the 3 segment.

Does anyone know if i can just change some settings or an easy way to do this?

Thanks alot in advance!
#2

[eluser]nmweb[/eluser]
If you have a good HTTP class for your application storing stuff in a session/ maintaining the session cookie in your application shouldn't be too hard a problem.
#3

[eluser]Joozt[/eluser]
[quote author="nmweb" date="1214846547"]If you have a good HTTP class for your application storing stuff in a session/ maintaining the session cookie in your application shouldn't be too hard a problem.[/quote]

Sounds good, but i don't really understand. The application will be written in C++ and i am noob at that (I am only building the server side)

Could you explain it a bit more?

Thanks for the reply btw Big Grin
#4

[eluser]KeyStroke[/eluser]
I think you're looking for help in the wrong place Joozt. This is a PHP forum, not C++.

You might have better luck at: http://cboard.cprogramming.com/
#5

[eluser]charlie spider[/eluser]
he says he is building the server side and is obviously using CI since he mentions using base_url().

is there a particular reason why you don't just keep the $username and $sessionID in the session cookie ?

seems strange to carry it around in the url when you already have a place to carry it around in !?!?!?




Theme © iAndrew 2016 - Forum software by © MyBB