segunda-feira, 30 de agosto de 2010

Nova tabuada

Consegui elaborar a tabuada interativa. Mas ainda não consigo fazer com que o valor inicial seja assumido. Quando na geração inicial a nao ser que estabeleça a variável com um valor inicial.
Veja o link: tabuada interativa

Programa da tabuada

<html>
<head><title>Teste</title></head>

<?php $m =$_GET["m"]; ?>
<body>

<h1 align=center><font style="background-color:red;">
  TABUADA DO <?php echo $m; ?></font></h1> 
<hr size=10 color=green>
<?php
  
  for ($i=0; $i<=10 ;$i++){
    $t=$i*$m;
    if($i & 1)echo '<font style="background-color:yellow;"> ';
    echo "$m X $i = $t <br></font>";
     };
?>
 
<hr  size=10 color=green />

<form action="http://localhost/tabuada1.php" method=get>
Calcule a tabuada do numero <input type=number name="m" value="4"
  maxlength=4>
<input type="submit">
</form>

</body>


</html>

Sem comentários:

Enviar um comentário