if you specified paramName: "value" on the autocompleter call then on php side your variable will be $_POST['value'].
simple pattern search would then work like: $searchTerm = mysql_real_escape_string($_POST['value']) . "%"; // add a wildcard and your query for example might look like "select * from foobar where last_name like '$searchTerm' when you want to use fulltext search keep in mind there's a ft_min_word_len config variable which defaults to 4 characters (so won't get any results when searching with 2 characters) On Fri, Jan 30, 2009 at 4:21 PM, disccomp <[email protected]> wrote: > >> and i need to get this value, like this $searchterm=$_REQUEST['id'];?? > > You should make it injections safe, for example if using PHP: > > $safe_id = mysql_real_escape_string($_REQUEST['id']); > $query = "SELECT last_name, first_name FROM people WHERE > last_name='$safe_id' "; > > Checkout http://us.php.net/mysql_real_escape_string > > > > -- Lars Schwarz Heiligengeiststr. 26 26121 Oldenburg T 0441 36110338 M 0151 1727 8127 W www.bitrocker.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---
