Wondering if someone can suggest a better approach to the current method I have of integrating php/js/mysql.
I use this method just fine for returning sample data, setting a unique value, etc, and it works just fine (with various authentication methods to slow an attack attempt). However, I want to now add relatively large amount of data and wondering if there is a better method?
Currently I do this:
JS
$.ajax( {
type : "GET",
url : "_dbGetSomeData",
dataType : "html",
success: function(data) {
parseData(data);
}
});
PHP
<?php
include '_common.php';
include '_auth.php';
$INPUT_EMAIL= mysql_real_escape_string($_GET["e"]);
$INPUT_FINGERPRINT = $_SESSION[SESH_VAR_NAME];
//--- Do some SQL stuff in the DB
?>
This works fine for a one-off request for data or setting one value, but can I use this method to save more data? I don't really want to start messing about with a huge querystring posts to the _db PHP file.
Here's an example of how you should do Ajax requests with jQuery/PHP/MySQL
JS
PHP