echo "<h4>Edit Listing</h4>";
echo "<form action='edit2.php' method=post>";
echo "<table cellpadding=2 cellspacing=0 width='100%'>";
echo "<tr >";
echo "<td colspan=2 class='subHeader'>*Fields will validate on submit</td>";
echo "</tr>";
while( $field = mysql_fetch_assoc($result) ){
if($field['Type'] != "Mapping"){
switch($field['Type']){
case "text":
echo "<tr>";
echo "<td valign='top' width='30%'><strong>".$field['Title']."</strong></td>";
echo "<td >";
if( ($field['MaxChars']*1) > 0 )
[b]More code.... etc[/b]
break;
case "textarea":
echo "<tr>";
echo "<td valign='top'><strong>".$field['Title']."</strong></td><td>";
if( ($field['MaxChars']*1) > 0 ){
$max = $field['MaxChars'];
$id = $field['Title'].'_message';
[b]More code.... etc[/b]
break;
case "select":
echo "<tr>";
echo "<td valign='top' width='30%'><strong>".$field['Title']."</strong></td>";
echo "<td >";
echo "<select name='".$field['Title']."'>";
$node = new sqlNode();
[b]More code.... etc[/b]
break;