Hi,
I have a VERY simple script. And an elusive bug. Please help, thanks in advance.
SCRIPT START--
function print_info($echo, $infoType, $printType)
{
$result = mysql_query("SELECT $infoType FROM strategy");
if(!$result)
{
echo("<P>Error performing query: " . mysql_error() . " </P>");
exit();
}
echo($echo);
if($printType)
{
while($row = mysql_fetch_array($result))
{
echo( . $row["$infoType"] . );
}
}
else
{
while($row = mysql_fetch_array($result))
{
echo("<p>" . $row["$infoType"] . "</p>");
}
}
}
init_db_variables(); //initialize the variables to connect to mysql db
connect_db(); //connect to the db
print_info("Released: ", GameDate, 0);
print_info("Game Publisher: ", GamePublisher, 0);
print_info("Game Producer: ", GameCreator, 0);
print_info("Game Review: ", GameReview, 1);
print_info("Review Author: ", ReviewerName, 0);
print_info("Date Written: ", DateReviewed, 0);
SCRIPT END--
When I run this, I get a parse error.
Thanks so much for reading this, please email answer to Ted@pcgamingnet.com if you have the time.
Thank you Thank you!
Ted