Posted by charliefortune on 10/10/50 11:29
Here is a portion of my code to do that
if (substr($fieldname,0,3)=="id_"){
$joiner=substr($fieldname,3,(strlen($fieldname)-2));
$query="SELECT id,$joiner from $joiner;";
$result2=mysql_query($query);
print "<tr>
<td width=\"25%\" class=\"databasetext2\">$fieldname</td>
<td width=\"20%\" class=\"databasetext2\">
<select name=\"$fieldname\">";
while ($select=mysql_fetch_row($result2)){
print "<option value=\"$select[0]\">$select[1]</option>";
}
print "</select>";
print "</td>";
}
[Back to original message]
|