Click to See Complete Forum and Search --> : [RESOLVED] Parse Error


scottyrob
04-04-2006, 08:55 AM
Hi, im having a parse error with this piece of code...


<?
require 'db_connect.php';

echo "<link rel='stylesheet' type='text/css' href='css/main.css' />";

$date = $_GET["prod_date"];

$query = "SELECT * FROM plate_bg WHERE prod_date = '".$date."'";
$result = mysql_query($query) or die("Error: " . mysql_error() . " with query $query");

if (!$result) {
$message = 'Invalid query: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $query;
die($message);
}


while ($row = mysql_fetch_array($result)) {

echo "<img src='images/plate_bg/".$row['image']."' width='50' height='50' />";
echo "<br /><a href='bg_plate_info.php?prod_date=".$row['prod_date']."'>".$row['prod_date']."</a>\n";


mysql_free_result($result);
?>


If i type in lets say... http://www.loddonexplorers.co.uk/Erik/bg_plate_info.php?prod_date=1895

I get... Parse error: parse error, unexpected $ in /home/loddouk1/public_html/Erik/bg_plate_info.php on line 26

rch10007
04-04-2006, 09:04 AM
you dont have a } to close the while loop for starters