HELP! I've tinkered with this script for hours and keep getting:
Parse error: parse error in /home/blah/blah/blah/blah/bio.php3 on line 33
I don't know what's causing it!!!
<?
// connect to server or print report of failure
if (!($mysql_link = mysql_connect("localhost", "user", "id"))){
print "<tr align=\"center\">\n<td colspan=\"3\"><p>Unable to obtain data at this time</p></td>\n</tr>\n";
exit;
}
// select the 'correct' database
mysql_select_db("correct", $mysql_link);
// get all info from faculty table
$query = "SELECT * FROM faculty ";
$mysql_result = mysql_query($query, $mysql_link);
// get each row of faculty table and check if it's the right one
while($row = mysql_fetch_row($mysql_result)){
$IDcolumn = $row[0];
$lastname = $row[1];
$firstname = $row[2];
$position = $row[3];
$title = $row[4];
$picture = $row[5];
$email = $row[6];
$bio = $row[7];
$status = $row[8];
$pic = "../facbios/$picture";
if ("$IDcolumn" == "$ID"){
print "\n";
print "<head>\n";
print "<title>$firstname</title>\n";
print "</head>\n";
print "<body bgcolor="#FFFFFF">\n";
print "<table width=\"90%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n";
if (!($picture=="none")){
$size = getImageSize($pic);
print "<tr>\n";
print "<td width=\"25%\" align=\"center\" valign=\"middle\" bgcolor=\"#0099FF\"><img src=\"../facbios/$picture\" $size[3]></td>\n";
}
else {
print "<tr>\n";
print "<td width=\"25%\" align=\"center\" valign=\"middle\" bgcolor=\"#0099FF\"> </td>\n";
}
print "<td width=\"75%\" bgcolor=\"#000000\" align=\"right\"><font color=\"#FFFFFF\" size=\"4\"><b>$firstname $lastname</b></font></td>\n";
print "</tr>\n";
print "<tr>\n";
print "<td width=\"25%\" align=\"center\" valign=\"middle\" bgcolor=\"#0099FF\"> </td>\n";
print "<td width=\"75%\" bgcolor=\"#CCCCCC\"> </td>\n";
print "</tr>";
print "<tr>\n";
print "<td width=\"25%\" align=\"center\" valign=\"middle\" bgcolor=\"#0099FF\"> </td>\n";
print "<td width=\"75%\" bgcolor=\"#CCCCCC\"><b>$title $firstname $lastname is $position.</b>"
include(..\facbios\$bio);
print "<br><br><a href=\"mailto:$email\">$email</a><br><br></td>\n";
print "</tr>\n";
print "</table>\n";
print "</body>\n";
print "\n";
exit;
}
else{}
}
?>