How to insert value to textfield in PHP?
For the code below,how can I insert $value into the textfiled respectively?And did there any code like setEditable=false in Java to disable editing of particular textfield?Thanks...
PHP Code:
<?php
include ('dbconn.cfg');// database configuration file
$connection = @mysql_connect("localhost", "root", "") or die("Cannot connect to server!");
if (isset($_SESSION['gmembername']))
{
$tbl_name = "member";
$sql = "SELECT name,telephone,address FROM $tbl_name";
$result = @mysql_query($sql, $connection) or die("Cannot execute query.");
$numrow = mysql_num_rows($result);
if ($numrow != 0)
{
// fetch each record in result set
for ($counter == 0; $row = mysql_fetch_row($result); $counter++)
{
// build table to display result
print ("<h2><center>Member Profile</center></h2>");
print ("<table border = '1' cellpadding = '3' cellspacing = '2' style = 'background-color: #ADD8E6'>");
print ("<tr>");
print ("<th>Full Name</th>");
print ("<th>Telephone</th>");
print ("<th>Address</th>");
print ("</tr>");
print ("<tr>");
foreach ($row as $key => $value)
print ("<td><input type ='text'size = '30'></td>");
print ("</tr>");
print ("</table>");
}
}
}
?>