I am learning some PHP Stuffs. I am trying to add two number from a text box but it shows a error message. This error actually came from following <?php echo $c;?>
line but it look like ok for me. I used "empty " tag <?php echo empty($c);?>
to hide error but it didn't work. Why?
<body>
<?php
if(isset($_POST['submit_btn']))
{
$a=$_POST['no1'];
$b=$_POST['no2'];
$c=$a+$b;
}
?>
<form method="post">
<table border="3">
<tr>
<td>Number 1</td>
<td><input type="text" name="no1"/></td>
</tr>
<tr>
<td>Number 2</td>
<td><input type="text" name="no2"/></td>
</tr>
<tr>
<td>Result</td>
<td><input type="text" value="<?php echo $c;?>" /></td>
</tr>
<tr align="center">
<td colspan="2"><input type="submit" name="submit_btn"/></td>
</tr>
</table>
</form>
</body>
Here is my error message