Yes what you said is correct, but what i want in the fullname is a name that i query from another table called "users" wich contains more than 10000 users.
So ex:
if i go on the fullname and i'm writing "ro" i want to see all the users that starts with "ro"..."roberto" "ron" inside the users table . I used the jquery autocomplete script in a blank page and it works but if i try it in a new ticket it doesn't work.
Do you know why?
this is the main page
test.php that should be newticket.inc.php
<?php
include('test_autocomplete.php');//richiamo il file funzioni.php
?>
and thi is the other page
test_autocomplete.php
<?php
//leggo la stringa inserita nel campo ricerca del form
$search=$_POST;
$data = "SELECT * FROM iscritti WHERE NOMINATIVO = '$search'" ;
$query = mysql_query($data) or die("Couldn't execute query. ". mysql_error());
$data2 = mysql_fetch_array($query);
?>
CSS, SCRIPT PER AUTOCOMPLETE
$(document).ready(function(){
$("#tag").autocomplete("cwb_autocomplete.php", {selectFirst: true});
});
$data2)?>"/>
and then the last page cwb_autocomplete.php
<?php
$q=$_GET;
$mysqli=mysqli_connect('localhost','root','151083','test') or die("Database Error");
$sql="SELECT NOMINATIVO FROM iscritti WHERE NOMINATIVO LIKE '%$q%' ORDER BY NOMINATIVO";
$result = mysqli_query($mysqli,$sql) or die(mysqli_error());
$special_char = array("|");
if($result)
{
while($row=mysqli_fetch_array($result))
{
echo str_replace($special_char, "'", $row)."\n";
}
}
?>
If you need all the files let me know, but the final result should be a search autocomplete inside the fullname textfield. It should be able to query the users table in the Database.
I hope it helps
Many Thanks,
Roberto