ajax() data, can only pass parameters as string
- function db_query(id)
{
$.ajax({
type: "GET",
url: "db_handler.php",
data: { row_id:id, foo: "bar" },
dataType: "html",
success: function(response){
// ...
}
});
}
Hey guys, what am I doing wrong here?
In my php script I receive the variables passed as strings, but I'm unable to read them when they are passed as variables.
$_GET output:
-
Array
(
[foo] => bar
)