title: Security risk in using jQuery Ajax
body: <p>This is a question has has been bother me for a while, so I am looking for opinions and solutions to clamp down on the possibility of the app being a security risk.</p>
  
  <p>I use jQuery for lots of things, but mainly I use it for processing jQuery dialog windows.  A lot of times there is the need to grab a value from a field on the form, concatenate that information with a .serialize() command and pass it off to jQuery ajax call to head over to PHP files for database interaction.</p>
  
  <p>Here comes my question (finally),</p>
  
  <p><strong>Isn't it riduclasly easy to 'guess' what the url could look like for the PHP processing?</strong><br>
  You can open the source in a modern browser and click a link to look at the full JavaScript file containing the ajax call.  </p>
  
  <p>I could possibly Minify the JavaScript file for obfuscation, but that's not a form of security to be relied apon.  </p>
  
  <p>I am using PDP for databases access with prepared statements for SQL injection attacks, but if someone took to the time to look, couldn't they just form a valid url send it off to the database and insert what they want?</p>
  
  <p>I am not talking about hacking the database to steel information, I am more talking about inserting malicious information as though the data was added from the application itself.  Think adding something to your shopping cart that is $50 for only $25.</p>
  
  <p>If it just as simple as turning the ajax request from GET to POST and changing my PHP files?</p>
  
  <p><strong>Edit:  The person is logged in and properly authenticated.</strong></p>
  
  <p>Just wondering what other people out there do.</p>
  
  <p>Thanks!</p>