Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it L'avatar di nep036
    Registrato dal
    Nov 2003
    Messaggi
    1,453

    [MX sendandload] dove sbaglio?

    all'interno di un mc sullo stage ho un pulsante con

    on (press){
    create = new LoadVars();
    create._root.table.eventname = _root.table.eventname.text;
    create._root.table.tabnameinput = _root.table.tabnameinput.text;
    create._root.table.tabcodeinput = _root.table.tabcodeinput.text;
    create._root.table.username4 = _root.table.username4.text;
    create._root.table.password4 = _root.table.password4.text;
    create._root.table.stato = _root.table.stato.text;
    create.sendAndLoad("create.php?stato=",create, "POST");
    create.onLoad =function (success){
    if (success){
    gotoAndStop(5);
    } else {
    gotoAndStop(6);
    }
    }
    }

    il php è

    <?php
    require ('conf.inc3.php');

    $stato = $_POST ["stato"];
    $eventname = $_POST ["eventname"];
    $tabnameinput = $_POST ["tabenameinput"];
    $tabcodeinput = $_POST ["tabcodeinput"];
    $username4 = $_POST ["username4"];
    $password4 = $_POST ["password4"];

    $query = "
    INSERT INTO $table (usercreate, pwdcreate, nometavolo, codetavolo, evento)
    VALUES ('$username4', '$password4', '$tabnameinput', '$tabcodeinput', '$eventname')
    ";
    mysql_query($query);
    $msg1='Thank you, table created';
    $msg2='Server error, try later!';
    if ($query)
    {
    print '&stato='.$msg1;
    } else {
    print '&stato='.$msg2;
    }
    ?>


    Non mi inserisce il record nel db, eppure ho replicato un altra form funzionante che ho però sulla _root!!!

    Se qualcuno trova l'errore ringrazio!



  2. #2

    create.sendAndLoad("create.php?stato=",create, "POST");

    Ecco l'errore:

    create.sendAndLoad("create.php?stato=",create, "POST");

    Usi POST ma quando fai "create.php?stato=" stai inviando con il metodo GET.

    Spero di essermi spiegato bene.

    CIAO.
    http://www.dartea.com

  3. #3
    Utente di HTML.it L'avatar di nep036
    Registrato dal
    Nov 2003
    Messaggi
    1,453
    grazie mille!!!

    Proverò cosi

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.