HOME > PHP > PHP Forum > Error Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)
Error Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in C:\xampp\htdocs\Comcamp14th\HTML\page_profile.php
Code (PHP)
<?php
$objConnect = mysql_connect("localhost","root","") or die("Error Connect to Database");
$objDB = mysql_select_db("comcamp14th");
mysql_query("SET NAMES UTF8");
$strSQL2 = "SELECT * FROM files WHERE id_user = '".$_SESSION['id_user']."'";
$objQuery2 = mysql_query($strSQL2) or die ("Error Query [".$strSQL."]");
$objResult2 = mysql_fetch_array($objQuery2);
if (!$objResult2) {
echo " <img width=\"400\" class\"img-responsive profile-img margin-bottom-20\" src=\"assets/img/team/img1-md.jpg\"> ";
}
else {
[color=green]echo " <img width=\"260\" class\"img-responsive profile-img margin-bottom-20\" src=\"myfile/$objResult2[\"file_content\"]\"> ";
}
?>