Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //https://www.facebook.com/groups/353340335260087/
- //irc.vircio.org #sampa nick Phacker
- $tab=0;
- if(isset($_POST['tabuada'])){//recebe o valor inserido no input
- $tab=$_POST['tabuada'];//define $tab com o valor do post
- if(!is_numeric($tab)){//chega se o numero nao e numerico
- echo "Nao e um valor numerico!";//caso nao for int
- }else{
- for($num=0;$num<=10;$num++){//loop do valr a ser multiplicado
- echo $num." x ".$tab." = ".($num*$tab)."<br>";
- }
- }
- }
- ?>
- <style>
- .tabuada{width: 270px;}
- .resultado{width: 270px; height: 100%;}
- </style>
- <h3>Kjnetsecuryt</h3>
- <div class="tabuada">
- <form method="post">
- <fieldset>
- <legend><b>Tabuada</b></legend>
- <label>Digite um numero a ser multiplicado</label><br>
- <input type="text" name="tabuada">
- <input type="submit">
- </fieldset>
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement