$fields=array("fname","lname","dept","city","ophone","hphone","fax","email");
$sqlstmt="SELECT * FROM contacts WHERE id='$id'";
$result=mysql_query($sqlstmt);
foreach ($fields as $values) {
print " <tr $rowcolor>\n <td>$fieldn</td>\n <td><input
type=\"text\" name=\"$values\" value=\"$$values\"></td>\n </tr>\n";
}
I'm not sure how to explain this, when do the above (I have ommited
certain portions of my codes). The form will be displayed as:
First Name $fname
Last Name $lname
Department $dept
City $city
Office Phone $ophone
Handphone $handphone
Fax $fax
E-mail $email
How do I make it to display the actual values of $fname instead of the
variable name itself?
Thanks in advance..
regards