Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    non capisco perche non funzia questi script:

    non capisco perche non funzia questi script:
    in HTML:
    <html>
    <body>
    inserite due nume

    <formaction="ud01.php" method="post">
    valore 1: <input name ="w1">


    valore 2: <input name ="w2">


    <input type="submit">
    <input type="reset">
    </form>
    </body>
    </html>

    in PHP:
    <html>
    <body>
    <?php
    $ris=$w1+$w2;
    echo"la somma di $w1 e $w2 è $ris";
    ?>
    </body>
    </html>

  2. #2
    prova a fare cosi :
    in PHP:
    <html>
    <body>
    <?php
    $w1=$_POST['w1'];
    $w2=$_POST['w2'];
    $ris=$w1+$w2;
    echo"la somma di $w1 e $w2 è $ris";
    ?>
    </body>
    </html>

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.