将url数据从php文件获取到另一个通过ajax加载的数据

时间:2016-11-07 05:32:51

标签: javascript php jquery ajax

我正在玩一个用户个人资料页面,该页面从网址获取数据,以便用户加载特定内容,例如:UserProfiles.php?user = jay101。

我有一个单独的文件,该文件已被ajax加载,该文件检索有关该特定用户的其他信息

   var loadContent = function() {
   $('.commentContainer').load('userProfileComments.php');
    };

    $(document).ready(function() {
        $.ajaxSetup({ cache: false });
        loadContent();
        setInterval(loadContent, 10000);

    }); 

加载到userProfile.php(userProfileComments.php)中的文件,需要user_rofile.php使用$ _GET ['user']来使用mysqli检索有关用户的信息。

如何将$ _GET ['user']发送到userProfileComments.php,以便能够检索有关用户的信息?

感谢

0 个答案:

没有答案