|
I have a few textbox forms that I want to display the results of a database query in, using a variable.
For example:
<?
$x = "SELECT * FROM Database WHERE ID=200";
$result = @mssql_query($x, $conn); //$conn being my connection from an include file.
$emp = @mssql_fetch_array($result)
?>
<INPUT TYPE="text" NAME="name" Value="<? echo $emp['Name']; ?> ">
The textbox is supposed to display the "Name" field of the data base query. Am I doing this right?
|