PROGRAM
<?php
echo "
<form method='POST' action='' >
Range :<input type='text' name='range'>
<input type='submit' value='submit' name='submit'>
</form>
";
if(isset($_POST['submit']))
{
echo "EVEN NUMBERS IN A RANGE";
$n = $_POST['range'];
for($a=1;$a<=$n;$a++)
{
if($a%2==0)
echo $a."<br />";
}
}
?>
OUTPUT
<?php
echo "
<form method='POST' action='' >
Range :<input type='text' name='range'>
<input type='submit' value='submit' name='submit'>
</form>
";
if(isset($_POST['submit']))
{
echo "EVEN NUMBERS IN A RANGE";
$n = $_POST['range'];
for($a=1;$a<=$n;$a++)
{
if($a%2==0)
echo $a."<br />";
}
}
?>
OUTPUT
No comments:
Post a Comment