|
Posted by charliefortune on 10/01/21 11:29
I did this, with numbers instead of letters, but I guess it should work
either way. Here is the portion of my code...
if (substr($fieldname,0,3)=="id_"){
$joiner=substr($fieldname,3,(strlen($fieldname)-2)); //take off
'id_'
$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>";
}
Navigation:
[Reply to this message]
|