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>\n";
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";
$query = mysql_query("SELECT COUNT(*) FROM utenti_scacchirako WHERE user = '$user'");
$row = mysql_fetch_row($query);
if($row[0] > 0 ) {
echo "Nick già scelto!!!! Provane a inserirne un altro.";
exit;
} elseif($row[0] == 0 ) {
if ($user==TRUE && $pass==TRUE && $mail==TRUE )
{
if ($yahoo == FALSE) $yahoo = "n/a";
if ($icq == FALSE) $icq = "n/a";
if ($Msn == FALSE) $Msn = "n/a";
if ($sito == FALSE) $sito = "n/a";
$query = mysql_query("INSERT INTO 'utenti_scacchirako' ( '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.";
}
}
$query_close();
?>
la 113 mi crea problemi e il parser mi comunica questo:
Parse error: parse error, unexpected $ in /membri2/scacchirakoforum/registrazione/join.php on line 113
xkè ?????
grazie
ciao