Hi.
I've been trying to get this code to work for a few days now, but to no avail.
Here's what I want to do:
A list of reviews are presented on one page, and when clicked the review is pulled from the database.
I've got the variable passing from one page to the next, but I'm having problems retreving the information from the database.
Here's the error:
Parse error: parse error in /home/sites/site46/web/getreview.php on line 18
Here's the code:
<?php
/* Method to select the information forom the database and display the text */
include('mysqlsettings.php');
//Trap to stop the page if no connection to the database
if (! mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS) )
{
echo 'Failed to connect to host "' . MYSQL_HOST . '".';
exit;
}
mysql_select_db(MYSQL_DB);
$review_id = (integer) $HTTP_GET_VARS['rev_id']
// Select all the records
$query = "SELECT * FROM reviews LIMIT 1 WHERE reviewid = $HTTP_GET_VARS['rev_id']";
$result = mysql_query($query) or die("Error: " . mysql_error());
if(mysql_num_rows($result) == 0)
echo("Nothing to Display!");
include('pur_top.html');
//Loop to display the results
while ($row = mysql_fetch_array($result))
{
echo "<table cellspacing=1 cellpadding=3 width=100% bgcolor=#9966FF border=0>";
echo "<tbody><tr><td class=bmtext bgcolor=#e6e6fa height=13><b><font size=2>";
echo "{$row['title']}<br>";
echo "</font></b></td></tr><tr><td height=29 bgcolor=white ><font size=2>";
echo "{$row['review']}<br> ";
echo " ";
}
echo "</font></td></tr></tbody></table></td></tr><tr> ";
include('pur_bot.html');
?>
Any ideas will be greatly appreciated.
🙂