i have created api's to access from ios app.there are login and registeraion page also. when user access the api, from ios code userid of user is send as post. if user id matches in database then user is allowed to proceed with api call otherwise 'invalid request' message is shown to user.
should i proceed with this approach or when user login then at php server i need to store user info in php session and insstead of sending userid each time to php i should pick uses id from php session.
could anyone help me the better approach with reasons. i find no use of maintaining session at php server. session is mentaioned at ios side.