Observe the following error-free code to reverse the given number
<html>
<body>
<form method="POST" action="reverse.php">
<input type="text" name="t1" placeholder="enter a value">
<br>
<br>
<input type="submit" name="submit" value="reverse">
</form>
<?php
if(isset($_POST['submit']))
{
$val=$_POST['t1'];
$sum="";
$n=$val;
while($n!=0)
{
$rem=$n%10;
$sum.=$rem;
$quo=$n/10;
$n=floor($quo);
}
echo"the reversed value is".$sum;
}
?>
</body>
</html>