I am trying to write data from my database to a html textarea. I can write the data with the php print function. Below is the code.
Any help you can offer is greatly appreciated.
Thanks,
Fred Bernstein
<?php
$sqlquery = "SELECT * FROM dbo.TBL_FACULTY _INFORMATION WHERE ID_NUM = $id_num";
$fi_tbl = odbc_exec($sqlc onnect, $sqlquery);
if (!$fi_tbl) {
exit("Error in SQL 1");
}
odbc_fetch_row( $fi_tbl);
$ln = odbc_result($fi _tbl,"Last_Name ");
$fn = odbc_result($fi _tbl,"First_Nam e");
$mn = odbc_result($fi _tbl,"Middle_Na me");
$notes = odbc_result($fi _tbl, "NOTES");
print "notes = $notes";
print "<p>fn = $fn</p>";
print "<p>ln = $ln</p>";
odbc_close($sql connect);
?>
<form id="form1" name="form1" method="post" action="">
<textarea name="textarea" cols="75" rows="8" id="<?php echo $notes ?>"></textarea>
</form>
Any help you can offer is greatly appreciated.
Thanks,
Fred Bernstein
<?php
$sqlquery = "SELECT * FROM dbo.TBL_FACULTY _INFORMATION WHERE ID_NUM = $id_num";
$fi_tbl = odbc_exec($sqlc onnect, $sqlquery);
if (!$fi_tbl) {
exit("Error in SQL 1");
}
odbc_fetch_row( $fi_tbl);
$ln = odbc_result($fi _tbl,"Last_Name ");
$fn = odbc_result($fi _tbl,"First_Nam e");
$mn = odbc_result($fi _tbl,"Middle_Na me");
$notes = odbc_result($fi _tbl, "NOTES");
print "notes = $notes";
print "<p>fn = $fn</p>";
print "<p>ln = $ln</p>";
odbc_close($sql connect);
?>
<form id="form1" name="form1" method="post" action="">
<textarea name="textarea" cols="75" rows="8" id="<?php echo $notes ?>"></textarea>
</form>
Comment