Wednesday 7 September 2016

How to print the table of any number using user input in php


* How to print the table of any number  using  user input in php *


<?php

if(isset($_POST['n'])){
$x=1;
$t = $_POST['val'];
do{
echo $x*$t;
echo"<br>";
$x++;


}

while($x<=10);
}
?>

<form action="" method="post">
<div class="header">
<textarea rows="5" cols="40" name="val"></textarea> <br />


<input type="submit"  name="n" value="submit"  />
</form>

No comments:

Post a Comment