I'm trying to print each column row values into a text area without null? If I do it within the while then I got perfect but I need print it in HTML code outside of the while. How do I get this.
$sdata = mysql_query("select (case when `EntryType` like '%Buildup%' then `EntryDescription` end) As cia,
(case when `EntryType` like '%prelim%' or '%grinding%' then `EntryDescription` end) As grind,
(case when `EntryType` like '%Covers%' then `EntryDescription` end) As covers,
(case when `EntryType` like '%prelim%' or '%grinding%' then `EntryDescription` end) As buildup,
(case when `EntryType` like '%Comment%' then `EntryDescription` end) As comments
from `selectitem`
JOIN `patient` on `patient`.`RecdNo` = `selectitem`.`RecordID`
WHERE `patient`.`PatientID`='".$_GET['edit']."'");
while($data = mysql_fetch_array($sdata) ){
}
HTML Code Here:
<tr>
<td colspan="2"> <textarea rows="2" name="cia" style="width:90%;"><?php echo $data['cia']; ?></textarea> </label> </td>
<td colspan="2"> <textarea rows="2" name="grind" style="width:100%;"><?php ?> </textarea> </td>
</tr>
<tr>
<td colspan="2"><i>Covers</i> </td>
<td colspan="2"><i>Build Up</i> </td>
</tr>
<tr>
<td colspan="2"> <textarea rows="2" name="covers" style="width:90%;"><?php ?> </textarea> </label> </td>
<td colspan="2"> <textarea rows="2" name="buildup" style="width:100%;"><?php ?> </textarea> </td>
</tr>
<tr>
<td colspan="4"> <i>Comments</i> </td>
</tr>
<tr>
<td colspan="4"> <textarea rows="2" name="comments" style="width:100%;"><?php ?> </textarea></td>
</tr>