Salta al contenuto
  • CATEGORIES
  • La Community Connect.gt
  • Presentati alla Community
  • News Ufficiali da Connect.gt
  • Internet News
  • A Scuola Di
  • Digital Marketing
  • Intelligenza Artificiale
  • SEO & GEO
  • Web Marketing e Content
  • Google Analytics e Web Analytics
  • Google Ads & Advertising
  • YouTube
  • TikTok, Instagram e altri Social
  • Google Adsense, Affiliazioni e Guadagno
  • E-Commerce
  • Coding e Sistemistica
  • Help Center: consigli per il tuo progetto
  • Hosting e Cloud
  • Coding
  • CMS & Piattaforme Self-Hosted
  • Annunci e Collaborazioni
  • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
  • Collaborazioni WEB e Lavoro: offro e cerco
  • Impresa, Fisco e Leggi
  • Consulenza Legale e Professioni Web
  • Consulenza Fiscale, Imprese, Startup e P.Iva
  • Gli Off Topic
  • PC, Smartphone e altri Hardware
  • Tutti i Software
  • GT Fetish Cafè
  • Discussioni
  • 0 Non letti 0
  • Recenti
  • Hashtag
  • Popolare
  • Utenti
  • Privacy
  • Termini e condizioni
  • © 2026 Search On Media Group S.r.l.
Collassa
Connect.gt
Il network Search On
Connect.gt WMF AI Festival Accademia Advanced SEO Tool AgentCy Social Media Strategies Search Tech
Registrati Accedi
Connect.gt
Stream Interest Categorie Hashtag
B

baxxter

@baxxter
Non seguire Segui
Informazioni
Post
3
Discussioni
2
Condivisioni
0
Gruppi
0
Da chi è seguito
0
Chi segue
0

Post

Recenti Migliore Controverso

  • Aiuto per sondaggio PHP
    B baxxter
    Coding

    a scusate mi sono dimenticato il file della tabelle che cè nel database:

    install.php

    <?php
    
    require("config.php");
    
    mysql_query("CREATE TABLE sonda (
    
    id INT( 11 ) NOT NULL AUTO_INCREMENT ,
    
    tot_1 VARCHAR( 255 ) DEFAULT 0 NOT NULL ,
    
    tot_2 VARCHAR( 255 ) DEFAULT 0 NOT NULL ,
    
    tot_3 VARCHAR( 255 ) DEFAULT 0 NOT NULL ,
    
    tot_4 VARCHAR( 255 ) DEFAULT 0 NOT NULL ,
    
    INDEX (id));");
    
    mysql_query("INSERT INTO sonda VALUES ('',0,0,0,0)");
    
    
    echo "Linstallazione è avvenuta con successo!<br />";
    ?>
    

  • Aiuto per sondaggio PHP
    B baxxter
    Coding

    Salve, io è da tanto che provo a fare funzionare un sondaggio in php ma non riesco a fargli salvare i dati nel database e a farglieli richiamare. vi posto l'intero script:

    config.php

    <?php
    
    $mysql[host] = "localhost";
    $mysql[user] = "root";
    $mysql[pass] = "";
    $mysql[name] = "dbsond";
    
    
    $question = "Come vi sembra il nostro sito?";
    $answers = array("Stupendo", "Bello", "Brutto", "Schifo");
    
    
    
    @mysql_connect($mysql[host], $mysql[user], $mysql[pass]);
    @mysql_select_db($mysql[name]);
    ?>
    

    index.php

    <?php
    
    require("config.php");
    
    
    echo '<form action="vote.php" method="post">';
    echo "<strong>{$question}</strong><br><br>";
    
    
    
    for ($i = 0; $i <= count($answers) - 1; $i++)
    
    {
    
    echo "<input type=\"radio\" name=\"a\" value=' . ($i + 1) . '>{$answers[$i]}<br>";
    }
    
    
    
    echo '<br><input type="submit" value="Vota">';
    echo '<a href="results.php">Risultati</a>';
    echo '</form>';
    ?>
    

    vote.php

    <?php
    
    require("config.php");
    
    
    mysql_query("UPDATE sonda SET tot_{$_POST[a]} = tot_{$_POST[a]} + 1");
    header("Location: results.php");
     
    ?>
    

    results.php

    <?php
    
    require("config.php");
    
    
    $query = @mysql_query("SELECT * FROM sonda");
    $result = @mysql_fetch_array($query);
    
    
    
    echo "<strong>{$question}</strong><br><br>";
    for ($x = 1; $x <= count($answers); $x++)
    
    {
    
    $total = $total + $result[tot_ . $x];
    }
    
    
    
    for ($i = 1; $i <= count($answers); $i++)
    
    {
    
    @$percent = $result[tot_ . $i] / $total;
    $percent = $percent * 100;
    $percent = number_format($percent, 1);
    echo "" . $answers[$i - 1] . " (<strong>{$percent}%</strong>)<br />";
    }
    
    ?>
    

    qualcuno sa perchè non vengono aggiunti i dati al database e neanche ripresi?
    Ringrazio in anticipo.


  • Aiuto sondaggio PHP
    B baxxter
    Coding

    Salve a tutti, sono nuovo sul forum e spero di aver scritto nella sezione giusta.
    Io ho cercato di usare il sondaggio postato nel sito di Giorgio Tave è solo che dopo aver selezionato l'opzione nel form mi restituisce il messaggio "Errore impossibile votare" che è presente nell'if della pagina vai.php

    Qualcuno sa cosa può esserci di sbagliato?
    Ringrazio in anticipo.

  • Accedi

  • Non hai un account? Registrati

  • Accedi o registrati per effettuare la ricerca.
  • Primo post
    Ultimo post
Home Accedi Registrati
Menu
  • CATEGORIES
  • La Community Connect.gt
  • Presentati alla Community
  • News Ufficiali da Connect.gt
  • Internet News
  • A Scuola Di
  • Digital Marketing
  • Intelligenza Artificiale
  • SEO & GEO
  • Web Marketing e Content
  • Google Analytics e Web Analytics
  • Google Ads & Advertising
  • YouTube
  • TikTok, Instagram e altri Social
  • Google Adsense, Affiliazioni e Guadagno
  • E-Commerce
  • Coding e Sistemistica
  • Help Center: consigli per il tuo progetto
  • Hosting e Cloud
  • Coding
  • CMS & Piattaforme Self-Hosted
  • Annunci e Collaborazioni
  • Annunci Vendita e Acquisto: Pubblicità, Domini, Link e altro
  • Collaborazioni WEB e Lavoro: offro e cerco
  • Impresa, Fisco e Leggi
  • Consulenza Legale e Professioni Web
  • Consulenza Fiscale, Imprese, Startup e P.Iva
  • Gli Off Topic
  • PC, Smartphone e altri Hardware
  • Tutti i Software
  • GT Fetish Cafè
  • Discussioni
  • Non letti 0
  • Recenti
  • Hashtag
  • Popolare
  • Utenti
  • Privacy
  • Termini e condizioni
  • © 2026 Search On Media Group S.r.l.