Visualizzazione dei risultati da 1 a 4 su 4
  1. #1
    Utente di HTML.it
    Registrato dal
    Apr 2004
    Messaggi
    172

    convertitore di valuta dati da remoto e funzionamento in locale

    ciao a tutti, ho fatto questo semplice giocattolo come convertitore di valuta, ma ho due problemi
    1) vorrei che i tassi di cambio eurouno, eurodue, eurotre,dollarouno,dollarodue, pounduno si aggiornassero atomaticamente magari prendendoli da qualche server preposto, ma non ho esperienza
    2) far funzionare in locale lo script ( che in remoto su server web funziona, ma in localhost con easyphp, mi da questo errore al posto dei risultati....

    Notice: Undefined variable: dollarinseriti in c:\program files\easyphp1-8\www\cc.php on line 66
    0,00



    <?php
    $eurouno = "1.47";
    $eurodue = "0.79";
    $eurotre = "173";
    $dollarouno = "0.54";
    $dollarodue = "118";
    $pounduno = "218";
    ?>

    <html>
    <head>
    <title>Currency converter</title>
    </head>
    <body>
    <div align="center"><font size="20" face="arial">CURRENCY CONVERTER


    </font></div>
    <form method=post action=cc.php>

    <table width="717" height="207" border="1" align="center">
    <tr>
    <td height="51" width="118"></td>
    <td height="51" width="119">type currency to convert here</td>
    <td height="51" width="119" align="center"><font color="#0000FF">EURO</font></td>
    <td height="51" width="119" align="center"><font color="#FF0000">USD
    DOLLARS
    </font></td>
    <td height="51" width="119" align="center"><font color="#808080">
    POUND
    </font></td>
    <td height="51" width="119" align="center"><font color="#008000">
    NAIRA
    </font></td>
    </tr>
    <tr>
    <td height="52" width="118" align="center"><font color="#0000FF">EURO</font></td>
    <td height="52" width="119"> <input size='10' name='euroinseriti' value='<? echo $euroinseriti; ?>'> </td>
    <td height="52" width="119">

    <?php
    $euroinseriti1 = number_format ($euroinseriti, 2, ',', '.' );

    echo "$euroinseriti1";
    ?>

    </td>
    <td height="52" width="119">
    <?php


    $euroindollari = $euroinseriti*$eurouno ;
    $euroindollari1 = number_format ($euroindollari, 2, ',', '.' );

    print("$euroindollari1");


    ?>




    </td>
    <td height="52" width="119"><?php


    $euro2pound = $euroinseriti/$eurodue ;
    $euro2pound1 = number_format ($euro2pound, 2, ',', '.' );
    print("$euro2pound1");


    ?>


    </td>
    <td height="52" width="119"><?php


    $euro2naira = $euroinseriti*$eurotre ;
    $euro2naira1 = number_format ($euro2naira, 2, ',', '.' );

    print("$euro2naira1");


    ?></td>
    </tr>
    <tr>
    <td height="52" width="118" align="center"><font color="#FF0000">USD
    DOLLARS
    </font></td>
    <td height="52" width="119"> <input size='10' name='dollarinseriti' value='<? echo $dollarinseriti; ?>'> </td>
    <td height="52" width="119"><?php


    $dollari2euro = $dollarinseriti/$eurouno ;
    $dollari2euro1 = number_format ($dollari2euro, 2, ',', '.' );
    print("$dollari2euro1");


    ?></td>
    <td height="52" width="119">
    <?php
    $dollarinseriti1 = number_format ($dollarinseriti, 2, ',', '.' );

    echo "$dollarinseriti1";
    ?>

    </td>
    <td height="52" width="119"><?php


    $dollari2pound = $dollarinseriti*$dollarouno ;
    print("$dollari2pound");


    ?></td>
    <td height="52" width="119"><?php


    $dollari2nai = $dollarinseriti*$dollarodue ;
    $dollari2nai1 = number_format ($dollari2nai, 2, ',', '.' );

    print("$dollari2nai1");


    ?></td>
    </tr>
    <tr>
    <td height="52" width="118" align="center"><font color="#808080">
    POUND
    </font></td>
    <td height="52" width="119"><input size='10' name='poundinseriti' value='<? echo $poundinseriti; ?>'> </td>
    <td height="52" width="119"><?php


    $pound2euro = $poundinseriti*$eurodue ;
    $pound2euro1 = number_format ($pound2euro, 2, ',', '.' );

    print("$pound2euro1");


    ?></td>
    <td height="52" width="119"><?php


    $pound2dollar = $poundinseriti/$dollarouno ;
    $pound2dollar1 = number_format ($pound2dollar, 2, ',', '.' );

    print("$pound2dollar1");


    ?></td>
    <td height="52" width="119">
    <?php
    $poundinseriti1 = number_format ($poundinseriti, 2, ',', '.' );

    echo "$poundinseriti1";
    ?>

    </td>
    <td height="52" width="119"><?php


    $pound2nai = $poundinseriti*$pounduno ;
    $pound2nai1 = number_format ($pound2nai, 2, ',', '.' );

    print("$pound2nai1");


    ?></td>
    </tr>
    <tr>
    <td height="52" width="118" align="center"><font color="#008000">
    NAIRA
    </font></td>
    <td height="52" width="119"> <input size='10' name='naireinserite' value='<? echo $naireinserite; ?>'> </td>
    <td height="52" width="119"><?php


    $nai2euro = $naireinserite*$eurotre ;
    $nai2euro1 = number_format ($nai2euro, 2, ',', '.' );

    print("$nai2euro1");


    ?></td>
    <td height="52" width="119"><?php


    $nai2doll = $naireinserite*$dollarodue ;
    $nai2doll1 = number_format ($nai2doll, 2, ',', '.' );

    print("$nai2doll1");


    ?></td>
    <td height="52" width="119"><?php


    $nai2pound = $naireinserite*$pounduno ;
    $nai2pound1 = number_format ($nai2pound, 2, ',', '.' );

    print("$nai2pound1");


    ?></td>
    <td height="52" width="119">
    <?php
    $naireinserite1 = number_format ($naireinserite, 2, ',', '.' );

    echo "$naireinserite1";
    ?>
    </td>
    </tr>
    </table>
    <div align="center">



    <input type='submit' name='cc' value=' convert now '>

    </p>
    </div>
    </form>
    </body>
    </html>

  2. #2

  3. #3
    Utente di HTML.it
    Registrato dal
    Apr 2004
    Messaggi
    172
    ok, grazie per la risposta. i manuali li sto leggendo, ma quello che vorrei sapere è un attimo piu specifico non credi?
    magari per uno esperto sono cose base, ma per me che sto alle prime armi....

    cmqe per la storia del easyphp in locale ho risolto, mi manca il discorso della variabili aggiornate in remoto

  4. #4
    Le 3 pagine del manuale indicate non sono state scelte a caso. Si riferiscono specificatamente al tuo problema.

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 © 2025 vBulletin Solutions, Inc. All rights reserved.