I am new to PHP. I make connection to MS Access and receive data from database. All records output above my html code. The place in my html code does not have any output where I intended it. I am following the book but don't know where I am going wrong.
I am coming from a Cold Fusion background.
here is page code:
<?php
$resultid = odbc_connect ( "HMOInfo", "", "" );
if ( $resultid )
{
$id = odbc_exec ( $resultid, "SELECT Eventid,EventDate,EventTitle FROM tblEvents;" );
odbc_result_all ( $id );
odbc_free_result ( $id );
}
odbc_close ( $resultid );
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<head>
<title>Test Events</title>
</head>
<body>
<table width="90%" bgcolor="COCOCO">
<tr>
<td width="50%"><font face="arial" size=-1><b>Date</b></font></td>
<td width="50%"><font face="arial" size=-1><b>Title</b></font></td>
</tr>
</table>
<!-----Output here-------------->
<table width="90%" >
<tr>
<td width="50%"><font face="arial" size=-1> <b><?php echo "$EventTitle";?></b></font></td>
<td width="50%"><a href="Event_Output.php?eventid=<?php echo "$eventid";?>><font face="arial" size=-1><b><?php echo "$EventDate";?></b></font></a></td>
</tr>
</table>
</body>