A
Anonymous
Guest
Hi;
I have tried displaying 4 thumbnail photos on 1 row in the table, and talbe repeats its self, but I got the error message:Parse error: parse error, unexpected ',' in /home/symphon1/public_html/vicphotodatabase/billboard_new.php on line 43
I have checked line 43, it seems it is fine. Can you tell me what is wrong with line 43? Thanks so much.
<?php require_once('Connections/victorphoto.php'); ?>
<?php
$currentPage = $_SERVER["PHP_SELF"];
mysql_select_db($database_victorphoto, $victorphoto);
$query_r_result = "SELECT * FROM billboard";
$r_result = mysql_query($query_r_result, $victorphoto) or die(mysql_error());
$row_r_result = mysql_fetch_assoc($r_result);
$totalRows_r_result = mysql_num_rows($r_result);
$queryString_r_result = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_r_result") == false && stristr($param, "totalRows_r_result") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_r_result = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_r_result = sprintf("&totalRows_r_result=%d%s", $totalRows_r_result, $queryString_r_result);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>billboard</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="photos.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="strip">
<div id="nav">
<?php require_once('inc_nav.htm'); ?>
</div>
</div>
<div id="strip-orange">
<a href="#" class="title">Gallery photos of Billboard</a>
</div>
<div id="strip-y">
</div>
<div id="container">
<table border="0" cellspacing="0" cellpadding="4" width="90%" bgcolor="black">
<?php
$query_r_result = ("SELECT * FROM billboard WHERE billboardID ORDER BY name ASC ",$link);
$photocount = 0;
$x=1;
$cols=4;
while($row_r_result = mysql_fetch_assoc($r_result))
{
if($x==1)
print "\n<tr>\n";
print "<td valign='top'><a href='bill_detail.php?recordID=<?php echo $row_r_result['billboardID'];' ><img src='<?php echo $row_r_result['thumb']; ?>' alt='' border='0' id='i'><br>$values1[name]<br><font size='2' color='#FFCC00'>Click to Enlarge</font></a></td>\n";
//creates a new row
if($x==$cols)
{
print "</tr>";
$x=1;
}
else
$x++;
}
//fills in the additional cols
for($x;$x<=$cols;$x++)
print "<td > </td>\n";
?>
</tr>
</table>
I have tried displaying 4 thumbnail photos on 1 row in the table, and talbe repeats its self, but I got the error message:Parse error: parse error, unexpected ',' in /home/symphon1/public_html/vicphotodatabase/billboard_new.php on line 43
I have checked line 43, it seems it is fine. Can you tell me what is wrong with line 43? Thanks so much.
<?php require_once('Connections/victorphoto.php'); ?>
<?php
$currentPage = $_SERVER["PHP_SELF"];
mysql_select_db($database_victorphoto, $victorphoto);
$query_r_result = "SELECT * FROM billboard";
$r_result = mysql_query($query_r_result, $victorphoto) or die(mysql_error());
$row_r_result = mysql_fetch_assoc($r_result);
$totalRows_r_result = mysql_num_rows($r_result);
$queryString_r_result = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_r_result") == false && stristr($param, "totalRows_r_result") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_r_result = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_r_result = sprintf("&totalRows_r_result=%d%s", $totalRows_r_result, $queryString_r_result);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>billboard</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="photos.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="strip">
<div id="nav">
<?php require_once('inc_nav.htm'); ?>
</div>
</div>
<div id="strip-orange">
<a href="#" class="title">Gallery photos of Billboard</a>
</div>
<div id="strip-y">
</div>
<div id="container">
<table border="0" cellspacing="0" cellpadding="4" width="90%" bgcolor="black">
<?php
$query_r_result = ("SELECT * FROM billboard WHERE billboardID ORDER BY name ASC ",$link);
$photocount = 0;
$x=1;
$cols=4;
while($row_r_result = mysql_fetch_assoc($r_result))
{
if($x==1)
print "\n<tr>\n";
print "<td valign='top'><a href='bill_detail.php?recordID=<?php echo $row_r_result['billboardID'];' ><img src='<?php echo $row_r_result['thumb']; ?>' alt='' border='0' id='i'><br>$values1[name]<br><font size='2' color='#FFCC00'>Click to Enlarge</font></a></td>\n";
//creates a new row
if($x==$cols)
{
print "</tr>";
$x=1;
}
else
$x++;
}
//fills in the additional cols
for($x;$x<=$cols;$x++)
print "<td > </td>\n";
?>
</tr>
</table>