Posted: Mon Jul 16, 2007 2:20 pm
Like I said, more than one reason... What is missing at the end of this line?
Code: Select all
<?php
$counter = 0
?>A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<?php
$counter = 0
?>Code: Select all
<?
$counter = 0;
echo "<p>";
$res = mysql_query("SELECT id, user, item, price FROM coll_inven WHERE user='$log' ORDER BY id ASC");
while($r = mysql_fetch_row($res) ) $comments[] = $r;
foreach ($comments as $c)
{
?>
<?
$res = mysql_query("SELECT id, name, description, url, price, preview FROM collection WHERE id='$c[2]'");
$comico = mysql_fetch_row($res);
mysql_free_result($res);
?>
<a href="collectionview.php?id=<? echo "$comico[0]" ?>"><img src="collection/<? echo "$comico[5]" ?>" border=0></a>
<?
$counter++;
if ($counter % 20 == 0)
{
echo '</p><p>';
}
}
echo '</p>'
?>Take a look at these lines... You're missing three semicolons here.beloveddoll wrote:Aha, line 37 needed to be moved down a few lines. Thus the code becomes:
Code: Select all
<a href="collectionview.php?id=<? echo "$comico[0]" ?>"><img src="collection/<? echo "$comico[5]" ?>" border=0></a>Code: Select all
} echo '</p>' ?>
Code: Select all
$counter = 0;
$sql = '
SELECT *
FROM coll_inven ON coll_inven.item = collection.id
INNER JOIN collection `col`
WHERE coll_inven.user=\''.$log.'\'
ORDER BY coll_inven.id ASC';
$res = mysql_query($sql) or die(mysql_error());
if (mysql_num_rows($res) > 0) {
echo '<p>';
while($row = mysql_fetch_assoc($res)) {
//ouput stuff
$counter++;
if ($counter % 20 == 0) {
echo '</p><p>';
}
}
echo '</p>';
}