Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 12

Discussione: form sbagliato

  1. #1
    Utente di HTML.it
    Registrato dal
    Jan 2005
    Messaggi
    579

    form sbagliato

    cosa ha questo codice di sbagliato

    Codice PHP:
    <?php 
    require("config.php"); 

    echo 



    \n"

    if (
    $action == FALSE

    echo 
    "<form action=\"./join.php\" method=\"post\">\n"
    echo 
    "<table width=666 border=\"0\">\n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "<tr> \n"
    echo 
    "<td width="\62\">\n"
    echo 
    "<td width="\296"\>[b]User[/b]</td>\n";  
    echo 
    "<td width="\62"\>\n"
    echo 
    "<td width="\150"\><input name=\"user\" type=\"text\"></td> \n"
    echo 
    "<td width="\62"\>\n"
    echo 
    "</tr>\n"
    echo 
    "<td width="\62"\>\n"
    echo 
    "<tr> \n"
    echo 
    "<td width="\62"\>\n"
    echo 
    "<td width="\296"\>[b]Pass[/b]</td>\n";  
    echo 
    "<td width="\64"\>\n"
    echo 
    "<td width="\150"\><input name=\"pass\" type=\"password\"></td> \n"
    echo 
    "<td width="\62"\>\n"
    echo 
    "</tr> 
    echo "
    <td width="\62"\>\n"; 
    echo "
    <tr>\n";  
    echo "
    <td width="\62"\>\n"; 
    echo "
    <td width="\296"\>[b]mail[/b]</td>\n";  
    echo "
    <td width="\64"\>\n"; 
    echo "
    <td width="\150"\><input name=\"mail\" type=\"text\"></td>\n";  
    echo 
    "<td width="\62"\>\n"
    echo 
    "</tr>\n";  
    echo 
    "<td width="\62"\>\n"
    echo 
    "<tr>\n";  
    echo 
    "<td width="\62"\>\n"
    echo 
    "<td width="\296"\>[b]contatto Yahoo[/b]</td>\n";  
    echo 
    "<td width="\64"\>\n"
    echo 
    "<td width="\150"\><input name=\"yahoo\" type=\"text\"></td>\n";  
    echo 
    "<td width="\62"\>\n"
    echo 
    "</tr>\n";  
    echo 
    "<td width="\62"\>\n"
    echo 
    "<tr>\n";  
    echo 
    "<td width="\62"\>\n"
    echo 
    "<td width="\296"\>[b]contatto Icq[/b]</td>\n";  
    echo 
    "<td width="\64"\>\n"
    echo 
    "<td width="\150"\><input name=\"icq\" type=\"text\"></td>\n"
    echo 
    "<td width="\62"\>\n"
    echo 
    "</tr>\n";  
    echo 
    "<td width="\62"\>\n"
    echo 
    "<tr>\n";  
    echo 
    "<td width="\62"\>\n"
    echo 
    "<td width="\296"\>[b]contatto Msn[/b]</td>\n";  
    echo 
    "<td width="\64"\>\n"
    echo 
    "<td width="\150"\><input name=\"Msn\" type=\"text\"></td>\n";  
    echo 
    "<td width="\62"\>\n"
    echo 
    "</tr>\n";  
    echo 
    "<td width="\62"\>\n"
    echo 
    "<tr>\n";  
    echo 
    "<td width="\62"\>\n"
    echo 
    "<td width="\296"\>[b]indirizzo sito[/b]</td>\n";  
    echo 
    "<td width="\64"\>\n"
    echo 
    "<td width="\150"\><input name=\"sito\" type=\"text\"></td>\n";  
    echo 
    "<td width="\62"\>\n"
    echo 
    "</tr> \n"
    echo 
    "<td width="\62"\>\n";echo "<tr> \n"
    echo 
    "<td width="\62"\>\n"
    echo 
    "<tr align=\"center\"> \n"
    echo 
    "<td width="\62"\>\n"
    echo 
    "<td colspan=\"2\" width="\296"\><input type=\"hidden\" name=\"action\" value=\"join\"><input type=\"submit\" value=\" Join! \"></td>\n";  
    echo 
    "<td width="\64"\>\n"
    echo 
    "</tr>\n";  
    echo 
    "<td width="\62"\>\n"
    echo 
    "</table>\n"
    echo 
    "</form>\n"

    else 

    if (
    $user==TRUE && $pass==TRUE && $mail==TRUE 

    if (
    $cognome == FALSE$cognome "n/a"
    if (
    $yahoo == FALSE) $ = "n/a"
    if (
    $icq == FALSE) $ = "n/a"
    if (
    $Msn == FALSE) $ = "n/a"
    if (
    $sito == FALSE) $ = "n/a"
    @
    mysql_query("INSERT INTO 'utenti' ( 'id' , 'user' , 'pass' , 'mail' , 'yahoo' , 'icq' , 'Msn' , 'sito' ) 
    VALUES ('', 
    '" 
    $user "', 
    '" 
    $pass "', 
    '" 
    $mail "', 
    '" 
    $mail "', 
    '" 
    $yahoo "', 
    '" 
    $icq "', 
    '" 
    $Msn "', 
    '" 
    $sito "');"); 

    echo 
    "Grazie!
    Registrazione effettuata correttamente! Al più presto ti arriverà una e-mail
     
    all'indirizzo che tu ci hai dato, e la dovrai verificare la tua registrazione
    "


    else 

    echo 
    "Errore!
    Non hai compilato tutti i campi obbligatori."




    @
    mysql_close(); 
    ?>
    mi compare questo errore xkè????
    errore:

    Parse error: parse error, unexpected T_LNUMBER, expecting ',' or ';' in /membri2/scacchirakoforum/registrazione/join.php on line 12

    grazie
    ciao
    l'uomo è tutto ciò che non può essere

    http://www.ebug.it Discussioni da web Designer

    http://www.ebug.it/?p=354 e Dart Fener dove lo mettiamo lol

  2. #2
    Ciao...

    echo "<td width="62">\n";
    deve diventare
    echo "<td width=\"62\">\n";
    o, più leggibile...
    echo '<td width="62">\n';



  3. #3
    echo "<td width="62">\n";

    non puoi mettere doppi apici racchiusi in doppi apici rappresenta una interruzione di stringa.... nell'esempio:

    echo "<td width="
    62
    ">\n";

    devi mettere il carattere di escape \ oppure le apici singole.

    echo "<td width=\"62\">\n";

    echo "<td width='62'>\n";


    Il silenzio è spesso la cosa migliore. Pensa ... è gratis.

  4. #4
    Utente di HTML.it L'avatar di VaLvOnAuTa
    Registrato dal
    Jun 2002
    Messaggi
    2,003
    manca un \ alla riga 12 (precisamente questa echo "<td width="62">\n";)

  5. #5
    Utente di HTML.it
    Registrato dal
    Jan 2005
    Messaggi
    579
    e ora lo stesso codice cambiato mi fa comparire questo errore:
    Parse error: parse error, unexpected T_LNUMBER, expecting ',' or ';' in /membri2/scacchirakoforum/registrazione/join.php on line 13
    l'uomo è tutto ciò che non può essere

    http://www.ebug.it Discussioni da web Designer

    http://www.ebug.it/?p=354 e Dart Fener dove lo mettiamo lol

  6. #6
    non e' che adesso posti riga per riga...

    son tutte da modificare... fino al fondo

    Il silenzio è spesso la cosa migliore. Pensa ... è gratis.

  7. #7
    Utente di HTML.it
    Registrato dal
    Jan 2005
    Messaggi
    579
    scusa nn era questa la domanda
    ho sbagliato:
    Codice PHP:
    <?php 
    require("config.php"); 

    echo 



    \n"

    if (
    $action == FALSE

    echo 
    "<form action=\"./join.php\" method=\"post\">\n"
    echo 
    "<table width=666 border=\"0\">\n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "<tr> \n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "<td width=\"296\">[b]User[/b]</td>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<td width=\"150\"><input name=\"user\" type=\"text\"></td> \n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "</tr>\n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "<tr> \n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "<td width=\"296\">[b]Pass[/b]</td>\n";  
    echo 
    "<td width=\"64\">\n"
    echo 
    "<td width=\"150\"><input name=\"pass\" type=\"password\"></td> \n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "</tr> 
    echo "
    <td width=\"62\">\n"
    echo 
    "<tr>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<td width=\"296\">[b]mail[/b]</td>\n";  
    echo 
    "<td width=\"64\">\n"
    echo 
    "<td width=\"150\"><input name=\"mail\" type=\"text\"></td>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "</tr>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<tr>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<td width=\"296\">[b]contatto Yahoo[/b]</td>\n";  
    echo 
    "<td width=\"64\">\n"
    echo 
    "<td width=\"150\"><input name=\"yahoo\" type=\"text\"></td>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "</tr>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<tr>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<td width=\"296\">[b]contatto Icq[/b]</td>\n";  
    echo 
    "<td width=\"64\">\n"
    echo 
    "<td width=\"150\"><input name=\"icq\" type=\"text\"></td>\n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "</tr>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<tr>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<td width=\"296\">[b]contatto Msn[/b]</td>\n";  
    echo 
    "<td width=\"64\">\n"
    echo 
    "<td width=\"150\"><input name=\"Msn\" type=\"text\"></td>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "</tr>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<tr>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<td width=\"296\">[b]indirizzo sito[/b]</td>\n";  
    echo 
    "<td width=\"64\">\n"
    echo 
    "<td width=\"150\"><input name=\"sito\" type=\"text\"></td>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "</tr> \n"
    echo 
    "<td width=\"62\">\n";
    echo 
    "<tr> \n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "<tr align=\"center\"> \n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "<td colspan=\"2\" width=\"296\"><input type=\"hidden\" name=\"action\" value=\"join\"><input type=\"submit\" value=\" Iscriviti! \"></td>\n";  
    echo 
    "<td width=\"64\">\n"
    echo 
    "</tr>\n";  
    echo 
    "<td width="\62\">\n"
    echo 
    "</table>\n"
    echo 
    "</form>\n"

    else 

    if (
    $user==TRUE && $pass==TRUE && $mail==TRUE 

    if (
    $cognome == FALSE$cognome "n/a"
    if (
    $yahoo == FALSE) $ = "n/a"
    if (
    $icq == FALSE) $ = "n/a"
    if (
    $Msn == FALSE) $ = "n/a"
    if (
    $sito == FALSE) $ = "n/a"
    @
    mysql_query("INSERT INTO 'utenti' ( 'id' , 'user' , 'pass' , 'mail' , 'yahoo' , 'icq' , 'Msn' , 'sito' ) 
    VALUES ('', 
    '" 
    $user "', 
    '" 
    $pass "', 
    '" 
    $mail "', 
    '" 
    $mail "', 
    '" 
    $yahoo "', 
    '" 
    $icq "', 
    '" 
    $Msn "', 
    '" 
    $sito "');"); 

    echo 
    "Grazie!
    Registrazione effettuata correttamente! Al più presto ti arriverà una e-mail
     
    all'indirizzo che tu ci hai dato, e la dovrai verificare la tua registrazione
    "


    else 

    echo 
    "Errore!
    Non hai compilato tutti i campi obbligatori."




    @
    mysql_close(); 
    ?>
    mi dice il parser che la riga 26 a qualkosa che nn và
    che cosa è????
    grazie
    ciao
    l'uomo è tutto ciò che non può essere

    http://www.ebug.it Discussioni da web Designer

    http://www.ebug.it/?p=354 e Dart Fener dove lo mettiamo lol

  8. #8
    Utente di HTML.it
    Registrato dal
    Jan 2005
    Messaggi
    579
    scusa nn era questa la domanda
    ho sbagliato:
    Codice PHP:
    <?php 
    require("config.php"); 

    echo 



    \n"

    if (
    $action == FALSE

    echo 
    "<form action=\"./join.php\" method=\"post\">\n"
    echo 
    "<table width=666 border=\"0\">\n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "<tr> \n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "<td width=\"296\">[b]User[/b]</td>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<td width=\"150\"><input name=\"user\" type=\"text\"></td> \n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "</tr>\n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "<tr> \n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "<td width=\"296\">[b]Pass[/b]</td>\n";  
    echo 
    "<td width=\"64\">\n"
    echo 
    "<td width=\"150\"><input name=\"pass\" type=\"password\"></td> \n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "</tr> 
    echo "
    <td width=\"62\">\n"
    echo 
    "<tr>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<td width=\"296\">[b]mail[/b]</td>\n";  
    echo 
    "<td width=\"64\">\n"
    echo 
    "<td width=\"150\"><input name=\"mail\" type=\"text\"></td>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "</tr>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<tr>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<td width=\"296\">[b]contatto Yahoo[/b]</td>\n";  
    echo 
    "<td width=\"64\">\n"
    echo 
    "<td width=\"150\"><input name=\"yahoo\" type=\"text\"></td>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "</tr>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<tr>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<td width=\"296\">[b]contatto Icq[/b]</td>\n";  
    echo 
    "<td width=\"64\">\n"
    echo 
    "<td width=\"150\"><input name=\"icq\" type=\"text\"></td>\n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "</tr>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<tr>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<td width=\"296\">[b]contatto Msn[/b]</td>\n";  
    echo 
    "<td width=\"64\">\n"
    echo 
    "<td width=\"150\"><input name=\"Msn\" type=\"text\"></td>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "</tr>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<tr>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "<td width=\"296\">[b]indirizzo sito[/b]</td>\n";  
    echo 
    "<td width=\"64\">\n"
    echo 
    "<td width=\"150\"><input name=\"sito\" type=\"text\"></td>\n";  
    echo 
    "<td width=\"62\">\n"
    echo 
    "</tr> \n"
    echo 
    "<td width=\"62\">\n";
    echo 
    "<tr> \n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "<tr align=\"center\"> \n"
    echo 
    "<td width=\"62\">\n"
    echo 
    "<td colspan=\"2\" width=\"296\"><input type=\"hidden\" name=\"action\" value=\"join\"><input type=\"submit\" value=\" Iscriviti! \"></td>\n";  
    echo 
    "<td width=\"64\">\n"
    echo 
    "</tr>\n";  
    echo 
    "<td width="\62\">\n"
    echo 
    "</table>\n"
    echo 
    "</form>\n"

    else 

    if (
    $user==TRUE && $pass==TRUE && $mail==TRUE 

    if (
    $cognome == FALSE$cognome "n/a"
    if (
    $yahoo == FALSE) $ = "n/a"
    if (
    $icq == FALSE) $ = "n/a"
    if (
    $Msn == FALSE) $ = "n/a"
    if (
    $sito == FALSE) $ = "n/a"
    @
    mysql_query("INSERT INTO 'utenti' ( 'id' , 'user' , 'pass' , 'mail' , 'yahoo' , 'icq' , 'Msn' , 'sito' ) 
    VALUES ('', 
    '" 
    $user "', 
    '" 
    $pass "', 
    '" 
    $mail "', 
    '" 
    $mail "', 
    '" 
    $yahoo "', 
    '" 
    $icq "', 
    '" 
    $Msn "', 
    '" 
    $sito "');"); 

    echo 
    "Grazie!
    Registrazione effettuata correttamente! Al più presto ti arriverà una e-mail
     
    all'indirizzo che tu ci hai dato, e la dovrai verificare la tua registrazione
    "


    else 

    echo 
    "Errore!
    Non hai compilato tutti i campi obbligatori."




    @
    mysql_close(); 
    ?>
    mi dice il parser che la riga 26 a qualkosa che nn và
    che cosa è????
    grazie
    ciao
    l'uomo è tutto ciò che non può essere

    http://www.ebug.it Discussioni da web Designer

    http://www.ebug.it/?p=354 e Dart Fener dove lo mettiamo lol

  9. #9
    echo "</tr>

    mancano le virgolette di chiusura e il punto e virgola.

    Il silenzio è spesso la cosa migliore. Pensa ... è gratis.

  10. #10
    Utente di HTML.it
    Registrato dal
    Jan 2005
    Messaggi
    579
    ora mi compare un'altro errore alla riga 83:

    }
    else
    {
    if ($user==TRUE && $pass==TRUE && $mail==TRUE )
    {
    if ($cognome == FALSE) $cognome = "n/a";
    if ($yahoo == FALSE) $ = "n/a";
    if ($icq == FALSE) $ = "n/a";
    if ($Msn == FALSE) $ = "n/a";
    if ($sito == FALSE) $ = "n/a";
    @mysql_query("INSERT INTO 'utenti' ( 'id' , 'user' , 'pass' , 'mail' , 'yahoo' , 'icq' , 'Msn' , 'sito' )
    VALUES ('',
    '" . $user . "',
    '" . $pass . "',
    '" . $mail . "',
    '" . $mail . "',
    '" . $yahoo . "',
    '" . $icq . "',
    '" . $Msn . "',
    '" . $sito . "');");

    echo "Grazie!
    Registrazione effettuata correttamente! Al più presto ti arriverà una e-mail

    all'indirizzo che tu ci hai dato, e la dovrai verificare la tua registrazione
    ";
    }
    else
    {
    echo "Errore!
    Non hai compilato tutti i campi obbligatori.";
    }
    }

    @mysql_close();

    queste sono le righe interessate
    e questo è l'errore che mi dice il parser:
    Parse error: parse error, unexpected '=', expecting T_VARIABLE or '$' in /membri2/scacchirakoforum/registrazione/join.php on line 83

    grazie
    ciao
    l'uomo è tutto ciò che non può essere

    http://www.ebug.it Discussioni da web Designer

    http://www.ebug.it/?p=354 e Dart Fener dove lo mettiamo lol

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 © 2024 vBulletin Solutions, Inc. All rights reserved.