I am just barely learning PHP. In this case, I built an application in ASP, and I am now trying to convert it.
Here's what I have on a particular page, that seems like it should work (according to all the refference material I've looked at) but it doesn't. Maybe someone can tell me what I've done wrong.
<?
//CONNECTION
$mysql_link = mysql_connect ("localhost");
$db = mysql_select_db("azrc", $mysql_link);
?>
<?
//RETRIEVE SHOW LIST FROM TABLE
$query = "SELECT event_title,event_description,time_start,venue ".
$query =." FROM cal_events C,cal_dates D WHERE C.event_id = D.event_id AND D.event_date = #".strftime("%m/%d/%Y").
$query =."# ORDER BY time_start asc");
$result = mysql_db_query($db,$sql);
?>
<?
if ($row = mysql_fetch_array($result)) //this is line 22
{
do {
print "<tr>";
print "<td><p><span class=\"eventTitle\"><b>".$row["event_title"]."</b></span><br>";
print "When: ".$row["time_start"]."<br>";
print "Where: ".$row["venue"]."<br>";
print "Details: ".$row["event_description"]."<br></p></td>";
print "</tr>";
print "<tr>";
print "<td><img src='images/spacer.gif' height=30></td>";
print "</tr>";
} while($row = mysql_fetch_array($mysql_result));
}
else
{
print "<tr>";
print "<td>Sorry. There are no shows listed for today.</td>";
print "</tr>";
}
?>
---------------
With this code, I get this error:
"Parse error: parse error in /var/www/html/azrc/rockCal_home.php on line 22"
(line 22 is marked above)
Any ideas?
Thanks