Visualizzazione dei risultati da 1 a 10 su 10

Discussione: Bug Paga!!

  1. #1

    Bug Paga!!

    Ciao!

    Ho un sistema nel mio sito con cui un utente può pagare un'altro!!
    Ed è controllato da due semplici query! Un'UPDATE per il mittente! Un'UPDATE per il destinatario!!

    Solo che c'è un bug che ho appena scoperto!! Se un utente prima davanti alla cifra inserisce un - riceve lui dei soldi invece che pagarli!! Come risolvo questo problema?
    ciao
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  2. #2
    N.B. l'update è di questo tipo!

    mittente: $query = "UPDATE pgu SET monete = monete - $_POST[monete] WHERE Nick='$user_id'";

    destinatario: $query = "UPDATE pgu SET monete = monete + $_POST[monete] ecc...

    quindi ritengo che quel - agisce sul segno di operazione dell'update!

    ma non so come evitarlo!!
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  3. #3
    E' molto urgente!!


    Aiutatemi!!
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  4. #4
    aiuto?
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  5. #5
    usa la funzione abs() sul numero in ingresso

  6. #6
    un'esempio?
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  7. #7
    //vari controlli su $_POST['monete'] per verificare che sia effettivamente un numero

    $_POST['monete']=abs($_POST['monete'];

    mittente: $query = "UPDATE pgu SET monete = monete - $_POST[monete] WHERE Nick='$user_id'";

  8. #8
    non mi funziona!!

    così ho fatto:

    $_POST['monete'] = abs($_POST['monete']);

    echo"$_POST[Monete]";

    e mi esce -10
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  9. #9
    ops..le lettere minuscole!!
    http://codecanyon.net/category/all?ref=Manuelandro
    And I bet she told a million people that she'd stay in touch, Well all the little promises they dont mean much,When theres
    memories to be made

  10. #10
    if ($_POST['monete'] < 0) $_POST['monete'] = -$_POST['monete'];
    I'm your dreams, make you real... I'm your eyes when you must steel...I'm pain when you can't feel...sad but true !

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.