Using Dreamweaver, i am tryin to append my recordset depending on the username but i am getting the following error:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIKE '%user1%'' at line 1
What i want to be able to do is if there is a user logged in to display their info.

I only got the error when i added the following line of code that is bold. Can someone help please

PHP Code:
<?php require_once('Connections/PropertyConnect.php'); ?>
<?php
if (!isset($_SESSION)) {
session_start();

}

if (!
function_exists("GetSQLValueString")) {
function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
{
if (
PHP_VERSION 6) {
$theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}

$theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

switch (
$theType) {
case 
"text":
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
break; 
case 
"long":
case 
"int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case 
"double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case 
"date":
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
break;
case 
"defined":
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
break;
}
return 
$theValue;
}
}

mysql_select_db($database_PropertyConnect$PropertyConnect);
$query_rsTestSim "SELECT information.custId, information.Username FROM information";
if (isset(
$_POST['InfoID'])) {
$Info mysql_real_escape_string($_POST['InfoID']);
$query_rsTestSim.= "WHERE custId LIKE '%$Info%'";
}
else if(isset(
$_SESSION['MM_Username'])){
$logUser mysql_real_escape_string($_SESSION['MM_Username']);
$query_rsTestSim.= "WHERE Username LIKE '%$logUser%'";

}
$rsTestSim mysql_query($query_rsTestSim$PropertyConnect) or die(mysql_error());
$row_rsTestSim mysql_fetch_assoc($rsTestSim);
$totalRows_rsTestSim mysql_num_rows($rsTestSim);

echo 
$query_rsTestSim;
echo 
$totalRows_rsTestSim;

?>