Created
          October 12, 2014 03:40 
        
      - 
      
 - 
        
Save matchs/548167c0f10190a073a8 to your computer and use it in GitHub Desktop.  
    Somador: Operador.php
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| echo "<html><head><title>Operador: Soma</title></head>"; | |
| echo '<form method="post" action="operacoes.php">'; | |
| echo '<label for="a">Valor A:</label><input type="text" maxlength="5" name="a" /><br/>'; | |
| echo '+<br/>'; | |
| echo '<label for="b">Valor B:</label><input type="text" maxlength="5" name="b" /><br/>'; | |
| echo '<input type="submit" value="Somar!" />'; | |
| echo '</form>'; | |
| if(isset($_POST['a'])){ | |
| $a = $_POST['a']; | |
| $b = $_POST['b']; | |
| echo '<h3>'.$a.' + '.$b.' = '.($a+$b); | |
| } | |
| echo "</body></html>"; | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment