Navigazione

    Privacy - Termini e condizioni
    © 2020 Search On Media Group S.r.l.
    • Registrati
    • Accedi
    • CATEGORIES
    • Discussioni
    • Non letti
    • Recenti
    • Hashtags
    • Popolare
    • Utenti
    • Stream
    • Interest
    • Categories
    1. Home
    2. biohazard93
    3. Post
    B

    biohazard93

    @biohazard93

    • Profilo
    • Chi segue 0
    • Da chi è seguito 0
    • Discussioni 2
    • Post 2
    • Migliore 0
    • Gruppi 0
    Iscrizione Ultimo Accesso
    Età 32
    0
    Reputazione
    2
    Post
    0
    Visite al profilo
    0
    Da chi è seguito
    0
    Chi segue
    User Newbie

    Post creati da biohazard93

    • "Doppia" query

      Salve a tutti,
      avrei la necessità di far si che 2 query agiscano contemporaneamente...mi spiego meglio.
      Vorrei gestire il mercato per un fantacalcio e mi servirebbe sapere come posso fare a far si che quando un utente acquista un giocatore, questo giocatore venga eliminato dal mercato e aggiunto ai giocatori dell'utente...
      Non so proprio come fare :S
      Scusate se mi sono espresso male

      postato in Coding
      B
      biohazard93
    • Problema inserimento record

      Salve a tutti,
      sono un nuovo utente...mi scuso per non essermi presentato ma è un problema che devo risolvere piu in fretta possibile XD
      Veniamo al dunque...ho postato qui i codici di 2 pagine...ho problema con la pagina php, in quanto quando parte lo script mi da errore di sintassi...riuscite a sistemarmi il problema? E magari vedere se è scritto tutto giusto o c'è qualcosa che non va...
      Grazie mille

      Index.html

      <html>
      <head><title>Inserimento record</title></head>
      <body>
      <table>
      <form method="post" action="record.php">
      <tr><td>Cognome</td>
      <td><input type="text" name="uno" size="20" maxlength="20"></td></tr>
      <tr><td>Nome</td>
      <td><input type="text" name="due" size="20" maxlength="20"></td></tr>
      <tr><td>Azienda</td>
      <td><input type="text" name="tre" size="20" maxlength="20"></td></tr>
      <tr><td>Ruolo</td>
      <td><input type="text" name="quattro" size="20" maxlength="20"></td></tr>
      <tr><td>Email</td>
      <td><input type="text" name="cinque" size="20" maxlength="20"></td></tr>
      <tr><td>Cellulare</td>
      <td><input type="text" name="sei" size="20" maxlength="20"></td></tr>
      <tr><td>Cognome</td>
      <td><input type="text" name="sette" size="20" maxlength="20"></td></tr>
      <tr><td>Nome</td>
      <td><input type="text" name="otto" size="20" maxlength="20"></td></tr>
      <tr><td>Azienda</td>
      <td><input type="text" name="nove" size="20" maxlength="20"></td></tr>
      <tr><td>Ruolo</td>
      <td><input type="text" name="dieci" size="20" maxlength="20"></td></tr>
      <tr><td>Email</td>
      <td><input type="text" name="undici" size="20" maxlength="20"></td></tr>
      <tr><td>Cellulare</td>
      <td><input type="text" name="dodici" size="20" maxlength="20"></td></tr>
      <tr><td>Email</td>
      <td><input type="text" name="tredici" size="20" maxlength="20"></td></tr>
      <tr><td>Cellulare</td>
      <td><input type="text" name="quattordici" size="20" maxlength="20"></td></tr>
      <tr><input type="submit" value="inserisci"></tr>
      </form>
      </table>
      </body>
      </html>
      

      Record.php

      <html>
      
      <title>Record</title>
      </head>
      <body>
      <?php
      $host= 'xxxxx' ;
      $user= 'xxxxxx' ;
      $password= 'xxxxx' ;
      $database= 'xxxxx' ;
      
      $1=$_POST['uno'];
      $2=$_POST['due'];
      $3=$_POST['tre'];
      $4=$_POST['quattro'];
      $5=$_POST['cinque'];
      $6=$_POST['sei'];
      $7=$_POST['sette'];
      $8=$_POST['otto'];
      $9=$_POST['nove'];
      $10=$_POST['dieci'];
      $11=$_POST['undici'];
      $12=$_POST['dodici'];
      $13=$_POST['tredici']:
      $14=$_POST['quattordici'];
      
      
      $db=mysql_connect($host, $user, $password) or die ("Impossibile connettersi al server $host");
      
      mysql_select_db($database) or die ("Impossibile connettersi al database $database");
      
      $query= "INSERT INTO `".$database."`.`travian` (  `primo`, `secondo`, `terzo`, `quarto`, `quinto`, 'sesto', 'settimo', 'ottavo', 'nono', 'decimo', 'undicesimo', 'dodicesimo', 'tredicesimo', 'quattordici' ) VALUE ( '$1', '$2', '$3', '$4', '$5' , '$6', '$7', '$8', '$9', '$10', '$11', '$12', '$13', '$14' );";
        if (!mysql_query($query))
       { 
      print("Attenzione, impossibile inserire il record");
       }
      else
      { 
      print("Il record è stato inserito");
      }
      
      mysql_close($db);
      ?>
      </body>
      </html>
      
      postato in Coding
      B
      biohazard93