Ok guys I know this question has been asked before but I am very new to PHP and JavaScript and hadn\'t even heard of ajax until i started looking for an answer to this question
Take a look at the .get() documentation. You're using it incorrectly.
You should be passing data (optional) and handling the data that gets returned, at a minimum:
$.get("backend.php",
{
// data passed to backend.php goes here in
//
// name: value
//
// format. OR you can leave it blank.
}, function(data) {
// data is the return value of backend.php
// process data here
}
);
If you pass data, you can retrieve it on backend.php
using $_GET
. In this case:
$_GET['name'];