I need help on php programming?

Jowy Atreides

New member
im taking php subject i find it easy but i just got problem with one of our exercises i cant get the output to be shown.. heres my code

<html>
<body>
<form action="exer005.php" method="post">
1st Integer:Â*<input type="text" name="num1">Â*Â*
2nd Integer:Â*<input type="text" name="num2">
<br>
<div align="center">
<input type="submit" value="SUBMIT">
<input type="reset" value="RESET">
</div>
<strong>NOTE:</strong> 1st Integer must be <strong>LOWER</strong>or <strong>EQUAL</strong> to the 2nd integer
</form>
<br>
<hr>
<?php
$num1=$_REQUEST['num1'];
$num2=$_REQUEST['num2'];

for( ; num2>=num1;num2--)
{
for( ; num1<=num2;num1++)
{
echo $num1;
echo "<br>";
}
}
?>
</body>
</html>
the output should be like this
ex. 1st integer is 2 and 2nd is 7
234567 should be shown but i cant get it to be shown im using macromedia dreamweaver

ive test the for loop at C++ and i got it to work...
 
Back
Top