chornbeck
10-19-2011, 11:33 PM
Here's the code - you can probably see what I'm attempting... I want to populate the form fields with the data that matches that field from the client table. I can't seem to get the $fieldfill = $rowclient['".$field."']"; statement to work out... Any suggestions?
$resultclient = mysql_query("SELECT * FROM Clients WHERE ClientID = '$GetClientID' ") or die(mysql_error());
$rowclient = mysql_fetch_array( $resultclient );
$result = mysql_query("SHOW COLUMNS FROM Clients");
echo "<form action='edit_process.php'>";
while ($row = mysql_fetch_assoc($result)) {
$field = $row['Field'];
$fieldfill = $rowclient['".$field."']";
echo $field.": <input type='text' name='".$field."' value='".$fieldfill."' /><br /><br />";
}
echo "</form>"
$resultclient = mysql_query("SELECT * FROM Clients WHERE ClientID = '$GetClientID' ") or die(mysql_error());
$rowclient = mysql_fetch_array( $resultclient );
$result = mysql_query("SHOW COLUMNS FROM Clients");
echo "<form action='edit_process.php'>";
while ($row = mysql_fetch_assoc($result)) {
$field = $row['Field'];
$fieldfill = $rowclient['".$field."']";
echo $field.": <input type='text' name='".$field."' value='".$fieldfill."' /><br /><br />";
}
echo "</form>"