Hi folks,
I am a complete n00b at php and mysql. I am teaching myself from books and the WWW, but alas I am stuck...
the error I get is:
Parse error: syntax error, unexpected T_STRING in X:\xampp\htdocs\search.php on line 7
here is the code:
<?php
mysql_connect ("localhost", "user", "password") or die (mysql_error());
mysql_select_db ("it_homehelp_test") or die (mysql_error());
$term = $_POST['term'];
$sql = $mysql_query(select * from it_homehelp_test where ClientName1 like '%term%'); <<<------this is line 7
while ($row = mysql_fetch_array($sql)){
echo 'Client Name:' .$row['ClientName1'];
echo 'Address:' .$row['Address1'];
echo 'Phone:' .$row['Tel1'];
}
?>
Any help you can offer would be great. I can also post the ".html" file that creates the search bar if it is needed.
Thanks