I have linked to a certain page using <a href=\"comments.php?ID=$ID\"> to use the value of $ID here:
$Query1 = "SELECT * FROM News WHERE ID = $ID";
$Result1 = odbc_exec($dbConnect, $Query1);
print("<table bgcolor=\"0099FF\" width=\"100%\">\n");
while(odbc_fetch_row($Result1));
{
$Author = odbc_result($Result1, 1);
$PostDate = odbc_result($Result1, 2);
$Title = odbc_result($Result1, 3);
$Post = odbc_result($Result1, 4);
$msgID = odbc_result($Result1, 5);
}
print("<tr>\n");
print("<td><b>$Title</b></td>\n");
print("<td>$PostDate by $Author</td>\n");
print("</tr>\n");
print("</table>\n");
print("$Post\n");
print("<br>\n");
print("<br>\n");
It will print all the other variables except $Post, which is a memo type. I get the following: Warning: SQL error: [Microsoft][ODBC Driver Manager] Invalid cursor state, SQL state 24000 in SQLGetData in c:\program files\apache group\apache\htdocs\nc\comments.php on line 19
Anyone know how to fix it or what I've done wrong, etc? I'm using MS Access 2000 if it makes a difference 🙂. Any help appreciated, thanx.