title: Optimal Way to Store data in MySQL from .NET
body: <p>I am collecting user input with a .NET application. The data is send to a MySQL Database and stored there. When needed, the data is requested from the .NET app and printed in the GUI. This all works fine and flawless.</p>
  
  <p>Till now i was making a direct DB connection from my local .NET app to the remote DB. As this is not a good idea i want to put a 'request-handler' in between now: a simple .php file which checks the user privileges before the required action.</p>
  
  <p>As i want to cover several flaws with this new implementation, im thinking what would be the best options to achive the following:</p>
  
  <ol>
  <li>prevent that the user puts illegal characters inside the DB</li>
  <li>keep the data-packages as small as possible</li>
  <li>easily read &amp; write the data-packages to/from the DB</li>
  </ol>
  
  <p>I have to admit that i am new to mysql/php and DBs in general. But my research till now brought me to the keywords <strong>JSON</strong> and <strong>XML</strong>.</p>
  
  <p>Could somebody tell me which of these, is more convienent for me to use? As the package-size is not the most important, more especially the 'illegal-character' prevention should work flawless...
  Am i on the right track with using XML? Any suggestion reagarding my issues are greatly appreciated!</p>