Hi,
I keep getting this error "Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' on line 21
" and have looked but cant figure out how to get the script working. Any thoughts?
if(isset($_REQUEST['search'])) {
$searchString = $_GET['search'];
$sql="SELECT First_Name, Last_Name, Labor_Grade FROM invoicedetail WHERE First_Name LIKE '".strtolower($_REQUEST['search'])."%' ORDER BY First_Name ASC";
$query = mysql_query($sql) or trigger_error(mysql_error(), E_USER_ERROR);
if($searchString != NULL) {
echo "<table width=300px cellpading=0 cellspacing=0 border=0>";
while($row = @mysql_fetch_array($query, MYSQL_BOTH)) {
echo "<tr>";
echo "<td class=\"tablehov\" onmouseout=\"this.className='tablehov'\"
onmouseover=\"this.className='tablehov3'\"
onclick="
document.getElementById('q').value='\".$row['q'].\"';
document.getElementById('First_Name').value='\".$row['First_Name'].\"';
document.getElementById('Last_Name').value='".$row['First_Name']."';
document.getElementById('searchResults').innerHTML =''">"
.$row['First_Name']." (".($row['Last_Name']).")";
echo "</td>";
echo "</tr>";
}
echo "</table>";
}
if(mysql_num_rows($query) == 0) {
echo "<i>No results found</i>";
}
}
?>