I'm developing an application that heavily relies on a server backend with a MySQL Database.
I have a fairly good grasp on both Swift and PHP, but I've never used them together so I have a few questions:
- I know how to make a POST request from Swift, what I don't know is how should I handle the data I get back from the server? For instance, If I was creating a login with a browser I would use $_SESSION for storing what I need. How does it work in Swift?
- When connecting to PHP, how do I handle individual functions? I was thinking of perhaps using a switch statement based on one of the Post parameters which will call the relevant function I want. Would this be a good idea or should I have an individual PHP file for each task?
Any help would be much appreciated.