Forum Moderators: coopster

Message Too Old, No Replies

Parse error on line 25 and I have no clue why

         

chaddsisco

8:36 pm on Aug 23, 2005 (gmt 0)

10+ Year Member



"Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home/pigsinbe/public_html/ballooncrew/gallery/centerpieces/gallery_centerpieces.php on line 25" is the error message I get from this code any ideas?

<?php

//connect to the database
$link = mysql_connect("localhost", "admin", "pass")
or die("Could not connect: " . msql_error());
mysql_select_db("gallery", $link)
or die (mysql_error());

$ImageDir = "/ballooncrew/gallery/centerpieces/";
$ImageThumb = $ImageDir . "/thumbs/";

$max_cols = 4;
?>

<html>
<head>
<title>Welcome to our Centerpeices Photo Gallery</title>
</head>
<body>
<p align="center">Click on any image to see it full sized.</p>
<table align="center">
<?php
echo "<tr>";
for ($i = 0; $i < $max_cols; $i+=1) {
echo " <td align=\"center\">Image</td>";
echo " <td align=\"center\">Caption</td>";
echo " <td align=\"center\">Date Uploaded</td>";
}
echo "</tr>";
?>

<tr>
<?php
$counter = 0;
//get the thumbs
$getpic = mysql_query("SELECT * FROM gallery_centerpieces")
or die(mysql_error());
while ($rows = mysql_fetch_array($getpic)) {
extract($rows);
if ($counter % $max_cols == 0 && $counter!= 0) { echo "</tr><tr>\n"; }
echo "<td><a href=\"".$ImageDir . $image_id . ".jpg\">";
echo "<img src=\"" . $ImageThumb . $image_id . ".jpg\" border=\"0\">";
echo "</a></td>\n";
echo "<td>" . $image_caption . "</td>\n";
echo "<td>" . $image_date . "</td>\n";
//echo "</tr>\n";
$counter += 1
}

?>

</table>
</body>
</html>

zCat

8:40 pm on Aug 23, 2005 (gmt 0)

10+ Year Member



Possibly:

$counter += 1

missing a semicolon?

zCat

1:23 am on Sep 4, 2005 (gmt 0)

10+ Year Member



(BUMP)

Did the above solve your problem? Just wondering...