here am trying to fetch data from a mysql table and populate it in a html. Everything works fine But I want to echo a html button through a IF condition. I dont know if this could work..if it works...can anyone please tell me how to make it work ?. The error am getting is...INTERNAL SERVER ERROR :(
NOTE : I have commeted the exact place where i have problem
<?php
if(mysql_num_rows($sql)){
while($rs = mysql_fetch_object($sql))
{
?>
<tr>
<td align="center"><?php echo $rs->cnf_name ;?></td>
<td align="center"><?php echo $rs->address;?></td>
<td align="center"><?php echo $rs->added_on;?></td>
<td align="center"><input type="button" class="btn" value="Edit" onClick="window.parent.editCnf('<?php echo $rs->cnf_name;?>','<?php echo $rs->username ;?>','<?php echo $rs->password;?>','<?php $rs->type;?>','<?php echo $rs->person_name;?>','<?php echo $rs->address;?>','<?php echo $rs->mobile_no?>','<?php echo $rs->email;?>','<?php echo $rs->country;?>','<?php echo $rs->city;?>','<?php echo $rs->state;?>','<?php echo $rs->area;?>')" ></td>
//PROBLEM
<td align="center">
<?php
if($rs->cnf_status == 0)
{
echo "<input type="button" class="btn" id="status" value="Activate" onClick="window.parent.deleteCnf(<?php echo $rs->user_id;?>,<?php echo $rs->cnf_status; ?>);">";
}
else
{
echo "<input type="button" class="btn" id="status" value="Activate" onClick="window.parent.deleteCnf(<?php echo $rs->user_id;?>,<?php echo $rs->cnf_status; ?>);">";
}
?>
</td>
</tr>
<?php
}
}
else
{
?> <tr>
<td colspan="">No data to display</td>
</tr>
<?php
}
?>
</tbody>
</table>