I'm a newbie at the whole PHP thing so I'm sure my error is simplistic. I've gotten several error messages and have found tweaks to fix each of them but now I've run into a wall and it seems to be the simplest error message of them all. The error is as follows: "Parse error: parse error, expecting `')'' in /home/www/aimersracing/diecast/preorder.php on line 39
And here is my script. I was hoping you could help me out.
<?php
//connect to DB
include ('connect.php');
//Query MySQL DB
$result = mysql_query("SELECT * FROM ar
LEFT JOIN company on ar.company_id=company.company_id
LEFT JOIN scale on ar.scale_id=scale.scale_id
WHERE stock_status = 0
order by ar.driver_number");
//gather results
if ($myrow = mysql_fetch_array($result)) {
//start table
echo "<table border=1>\n";
echo "<tr><td>Image</td><td>Info</td></tr>\n";
do {
//filename is the item number + t.jpg -- t shorthand for thumbnail
$filename = "$myrow[item_number]t.jpg";
echo "<tr><td><center>";
//if the file exists then print it. Otherwise print a generic image saying it doesn't exist.
if(file_exists(/images/$filename))
{
readfile(/images/$filename);
}
else
{
readfile(images/npat.jpg);
}
//print information about the product. Including a link to buy it.
printf ("<center></td><td><center><a href=\"drivers.php?driver=%s\">%s</a><br>
%s - %s<br>
%s : \$%s<br>
Release: %s <br>
<a href=\"cart.php?item=%s\">Preorder This Item</a></center></td></tr>\n",
$myrow["driver_name"], $myrow["driver_name"], $myrow["sponsor"], $myrow["value"], $myrow["size"], $myrow["price"], $myrow["release"], $myrow["item_number"]);
} while ($myrow = mysql_fetch_array($result));
echo "</table>\n";
//if no results found display this message
} else {
echo "Sorry, no records were found!";
}
?>
I think you all in advance for the help I've already recieved from this board and from the help I'm sure I'll get on my current problem.
-Jordan