简体   繁体   中英

JQUERY AutoComplete and PHP MVC

i wrote my own MVC framework, so i'm using URL Rewriting to redirect something like: mywebsite.com/index.php?p=Controller/Function :: TO :: mywebsite.com/Controller/Function

In my website i would like to use Autocomplete widget From jQuery UI with ajax. With ajax because i would like to search in a mysql database what the user fill in the field.

But according to the documentation jquery send a GET request: $_GET['term']. The problem is i never catch this variable. I think it's because of the url writing i made.

Can you please help me? Here is the htaccess file:

RewriteEngine on
RewriteRule ^([a-zA-Z0-9\-\_\/]*)$ index.php?p=$1

Thanks

Well, you are basically modifying the GET part of the URL, so you can not expect to still see it there. You could add an exception for the "&autocomplete=" or what the name of the variable is.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM