Parse Error
Moderator: General Moderators
Parse Error
Hello All
I am getting this error
Parse error: parse error, unexpected $end in c:\program files\apache group\apache\htdocs\furniture.php on line 135
I have tried to find the $ sign and any other errors made but could not.
I am sure it is a very common error must be some small mistake. Please do tell me.
Thanks
I am getting this error
Parse error: parse error, unexpected $end in c:\program files\apache group\apache\htdocs\furniture.php on line 135
I have tried to find the $ sign and any other errors made but could not.
I am sure it is a very common error must be some small mistake. Please do tell me.
Thanks
Hi Dale
I am getting this error now. I cannot find a solution for this problem as the same code works well with other pages.
Parse error: parse error, unexpected '/' in c:\program files\apache group\apache\htdocs\furniture.php on line 93
please advice.
Weirdan | Help us, help you. Please use
I am getting this error now. I cannot find a solution for this problem as the same code works well with other pages.
Parse error: parse error, unexpected '/' in c:\program files\apache group\apache\htdocs\furniture.php on line 93
Code: Select all
$query .= " )";
switch ($value) {
case "100": $query .= "value<= 100"; break;
case "200": $query .= "value>= 100 AND value <= 200"; break;
case "300": $query .= "value>= 200 AND value <= 300"; break;
case "500": $query .= "value>= 300 AND value <= 500"; break;
case "above": $query .= "value>= 500"; break;
}
if ($all_cost != "on") $query .= " AND (value='$value')";
$query .= " ORDER By value";
$result = db_query($query, $db_connection);
if (mysql_num_rows($result) > 0) {
echo "<p align="center"><a href="javascript:history.back();">Refine this search</a></p>";
echo "<table width="100%">";
while ($furniture = mysql_fetch_object($result)) {
$style = ($style == "#efefef") ? "#dedede" : "#efefef";
echo "<tr style="background-color: $style">";
echo "<td width="200" align="center">";
if (file_exists("pictures/property_".$property->id.".jpg")) echo "<img src="pictures/property_".$property->id.".jpg" />";
else echo "<img src="images/no_picture.gif" width="175" height="150" />";
echo "</td>";
echo "<td valign="top"><table width="100%"><tr><td width="50%" valign="top"><p><b>furniture type:</b> ".ucfirst($furniture->furniture_type)."<br/><b>Material:</b> $furniture->material_type<br /><b>Value:</b> &pound;$furniture->value."</p>";
echo "</td><td width="50%" valign="top"><p><b>Details:</b><br/>$furniture->detail</p></td></tr></table></td>";
echo "</tr>";
echo "</table>";
echo "<p align="center"><a href="javascript:history.back();">Refine this search</a></p>";
}
}
else {
echo "<p>There is no furniture that meet your search criteria, please <a href="javascript:history.back();">modify your search</a></p>";
db_disconnect($db_connection);
}
}Weirdan | Help us, help you. Please use
Code: Select all
andCode: Select all
tags where approriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]Well the only error type thing i can see is on line 94. Where it says it should say
Code: Select all
echo "</td><td width="50%" valign="top"><p><b>Details:</b><br/>$furniture->detail</p></td></tr></table></td>";Code: Select all
echo "</td><td width="50%" valign="top"><p><b>Details:</b><br/>$furniture->detail</p></td></tr></table></td>";Code: Select all
echo "<td valign="top"><table width="100%"><tr><td width="50%" valign="top"><p><b>furniture type:</b> ".ucfirst($furniture->furniture_type)."<br/><b>Material:</b> $furniture->material_type<br /><b>Value:</b> &pound;$furniture->value."</p>";Code: Select all
echo "<td valign="top"><table width="100%"><tr><td width="50%" valign="top"><p><b>furniture type:</b> ".ucfirst($furniture->furniture_type)."<br/><b>Material:</b> $furniture->material_type<br /><b>Value:</b> &pound;".$furniture->value."</p>";ex:
Code: Select all
echo '<td valign="top"><table width="100%"><tr><td width="50%" valign="top"><p><b>furniture type:</b> '.ucfirst($furniture->furniture_type).'<br/><b>Material:</b> '.$furniture->material_type.'<br /><b>Value:</b> &pound;'.$furniture->value.'</p>';