I'm trying to figure out how to make this code snippet display the value or the button but not both. As you'll see there is a button for "Call_Attempt_One". I'm trying to have it only display when there is no value in the field but have the field value displayed when there is a value and have the button disappear.
Suggestions?? Thanks!
<td style='font-size:12px;width:500px;'><div style=\"overflow-x:auto; max-height:100px\">{$row['Project_Description']}</div></td>
<td style='font-size:12px;'><center>{$row['Restoration_Decision_Matrix']}</center></td>
<td style='font-size:12px;'><center>
<form action='".$_SERVER['PHP_SELF']."' method='post'>
<input type='hidden' id='ID' name='ID' value='{$row['ID']}' />
<input type='submit' name='formCalledOne' id='formCalledOne' value='Called' />
</form>
{$row['Call_Attempt_One']}
</center></td>
<td style='font-size:12px;'><center><button type=\"submit\" form=\"form1\" value=\"Submit\">Called</button></center></td>
<td style='font-size:12px;'><center><button type=\"submit\" form=\"form1\" value=\"Submit\">Called</button></center></td>
<td style='font-size:12px;'><center><button type=\"submit\" form=\"form1\" value=\"Submit\">Emailed</button></center></td>
<td style='font-size:12px;'><center>Text Area</center></td>
<td style='font-size:12px;'><center>{$row['Received_Date']}</center></td>
<td style='font-size:12px;'><center>
<form action='".$_SERVER['PHP_SELF']."' method='post'>
<input type='hidden' id='ID' name='ID' value='{$row['ID']}' />
<input type='submit' name='formDelete' id='formDelete' value='Delete' />
</form>
</center></td>
</tr>";
}
//Check to see if delete button is pressed
if(isset($_POST['formDelete']))
{
if(isset($_POST['ID']) && !empty($_POST['ID']))
{
$ID = $_POST['ID'];
$result = mysql_query("DELETE FROM Project_Submissions WHERE ID ='".$ID."'");
}
}