jquery ui autocomplete with database

后端 未结 7 2106
隐瞒了意图╮
隐瞒了意图╮ 2020-12-08 08:41

I fairly new to JQuery and perhaps trying to achieve something that might be abit harder for a beginner. However I am trying to create an autocomplete that sends the curren

7条回答
  •  盖世英雄少女心
    2020-12-08 09:11

    Yes you do need header info for your json

            header("Expires: Mon, 26 Jul 1997 05:00:00 GMT" ); 
            header("Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" ); 
            header("Cache-Control: no-cache, must-revalidate" ); 
            header("Pragma: no-cache" );
            header("Content-type: text/x-json");
    

    and tvanfosson makes a good point abut the the plug

    in anycase I don't think you make the ajax call the plugin does.

    if you are infact using jquery-ui autocomple you should read over the documentation get a basic version running. your php is fine aside from the missing header data

提交回复
热议问题