search database for first three letters
Hi, I have created a form that searches a database by submitting to another page where the results are given. This works fine when the correct word is typed in but gives no results when only the first half is typed in. How do I manage to search for something on the first three letters I type?
The results page is coded:
<?php require_once('../Connections/connJobBook.php'); ?>
<?php require_once('../webassist/mysqli/rsobj.php'); ?>
$getClient = new WA_MySQLi_RS("getClient",$connJobBook,1);
$getClient->setQuery("SELECT * FROM contacts WHERE client LIKE ? ORDER BY client ASC");
$getClient->bindParam("s", "".(isset($_POST['name'])?$_POST['name']:"") ."", "-1"); //colname
and the form field is call 'name'.