tags:

views:

35

answers:

1

I need to get information from a php file and put the information in jquery and i also need to know if the information has changed

+3  A: 

Extremely vague question.

If you are putting the information into jquery:

$.ajax({
type: "GET",
url: "PHPFILE.php",
data: "data="+data,
success: function(data){ /* called when request to barge.php completes */
       //SET VARIABLES
    );
},
});


PHP:
if ($_GET["data"] != WHATEVER YOU ARE CHECKING HAS CHANGED)
{
  echo "new stuff";
}

For checking if the php page has changed, pass the current data in and do a comparison.

Gazler
can you give me a example of the php code please
Gully
Edited original post.
Gazler