开发者

Jquery getting information from php

开发者 https://www.devze.com 2022-12-17 07:40 出处:网络
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 cha开发者_运维问答ngedExtremely vague question.

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 cha开发者_运维问答nged


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号