I am trying to build my first mobile app which needs to connect to my mysql database and return data using json. This is fine, at the moment I have a login system that once it establishes that the username and password exists it then returns a success message.
For the next step I want to use ajax on my pages to connect to my database and return some data. Now the data I want returned needs to be only data for that user.
So my idea and this is where I need some advice, is that when the success message is returned I set the username that was entered in to the login form as a cookie and then can I use that cookie to form part of my query?
Is thIS possible or is there a better way of doing this?, I am new to developing with Javascript and normally just work with php so any advice would be well received.
Thanks