Visualizzazione dei risultati da 1 a 2 su 2

Discussione: Campo check box

  1. #1

    Campo check box

    Buongiorno a tutti,

    ho un problema a scrivere il dato di una checkbox sul mio mysql
    Utilizzo il seguente codice:

    <?PHP
    $check=$_POST['check'];
    ECHO "check= ",$check;
    $myconn = mysql_connect(....) or die("Errore...connessione" . mysql_error());
    mysql_select_db(...., $myconn) or die("Errore...database" . mysql_error());
    $SQL=mysql_query("insert into test(check) values('$check')");
    ?>

    Il post funziona perchè mi stampa on o null.

    Grazie

  2. #2

    Re: Campo check box

    Originariamente inviato da Andrew_de_moray
    Buongiorno a tutti,

    ho un problema a scrivere il dato di una checkbox sul mio mysql
    Utilizzo il seguente codice:

    <?PHP
    $check=$_POST['check'];
    ECHO "check= ",$check;
    $myconn = mysql_connect(....) or die("Errore...connessione" . mysql_error());
    mysql_select_db(...., $myconn) or die("Errore...database" . mysql_error());
    $SQL=mysql_query("insert into test(check) values('$check')");
    ?>

    Il post funziona perchè mi stampa on o null.

    Grazie
    Prova così..

    Codice PHP:
    <?PHP
    $check
    =$_POST['check'];
    echo 
    "check=".$check;
    $myconn mysql_connect(....) or die("Errore...connessione" mysql_error());
    mysql_select_db(...., $myconn) or die("Errore...database" mysql_error());
    $SQL=mysql_query("insert into test('check') values('$check')");
    ?>
    Forse ti stampa on o null perchè era impostata male la stampa...

    Fammi sapere...

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.