For the turn-based browser Flash RPG I'm working on, I'm using url-encoded query stings to pass data from PHP to Flash. Basically, Flash posts a request to PHP, then PHP pulls some data from a MySQL database, does some calculations and echos something like "health=100&mana=50&strength=10" which Flash reads. It seems to work fairly well, but I'm wondering if there is a better way to do it? As I go along, the number of character stats is increasing, and after inventory slots, it will probably be around 100 variables. All that only needs to be pulled from the MySQL database through PHP once at the beginning though, with much smaller queries during gameplay.
What you have here is basically a RESTful webservice API. The client communicates with the backend using HTTP requests with the request parameters in the query string. The backend then answers the request with the requested data in the body of the response. Using the query-string syntax for the response is unusual. Most people would use something like JSON or XML, but it's not a completely unreasonable solution.
Using RESful webservices is a very common architecture choice for client-server application. The main advantage is that it is not technology-specific. You can consume it with client applications implemented in any technology which can do HTTP requests. This is especially important in a case like yours where you are working with an obsolete technology like Flash. Down the line you will be forced to abandon it due to lack of browser support. But as long as you are using web services to communicate with your backend, you will very likely be able to keep using them with your new game client.
In the context of game development, there are however two drawbacks:
It usually sends text data. You might be able to save a lot of bandwidth when you use some binary encoding.
health=100&mana=50&strength=10uses 30 bytes of text to communicate 3 integers. You could do that with 12 bytes if you just send 3 32-bit binary numbers. Even less if 16 bit or 8 bit are sufficient in your case (8 bit would be enough in this particular example, but I don't want to assume you won't ever have more than 256 in any of these attributes). And this doesn't even account for the HTTP header which will be sent in both directions with every message and can be several hundred bytes.
Note that webservices can return binary data. It's just a very uncommon thing to do. But don't let that stop you.
HTTP uses the TCP protocol. This is fine for slower-paced games. But it isn't suitable for action-oriented games where every millisecond of latency matters. When your game is one of these, it would be better to use UDP if possible.