ciao a tutti! vorrei condividere con voi un pezzetto di un mio codice che attualmente mi da errore, si tratta di parte di uno script di registrazione, se l'utente erra lo script si blocca inserendo l'errore in un array, questa è la parte dove invece si procede alla registrazione.

Codice PHP:
if (empty ($errore))
$password md5($_POST['password']);
$var md5(rand()); 
$query 'INSERT INTO utenza (nome, cognome, username, password, verifica, domanda, risposta, numero_carta, carta, mail)  
VALUES  ("' 
$_POST['nome'] . '", 
 "' 
$_POST['cognome'] . '",  
 "' 
$_POST['username'] . '",         
  ".$password.",         
  ".$verifica.", 
 "' 
$_POST['domanda'] . '",
  "' 
$_POST['risposta'] . '", 
 "' 
$_POST['num_carta'] . '",  
   ' 
$_POST['carta'] . ', 
    "' 
$_POST['mail'] . '")';  
mysql_query($query,$db) or die (mysql_error($db));
 
$to $_POST['mail'];
 
$soggetto "the last one step!";
 
$testo "welcome to miosito community " $_POST['username']
 
"!
to activate your account you must only click on the following link:
" "www.miosito/activate.php?chiavediattivazione=" 
$var 

Thank you for choosing to work with us! :) !"
$from_address ='noreply@miosito.com'$headers 'From: ' $from_address "\r\n";
 
$success mail($to$soggetto$testo$headers); 
if (
$success)
{ echo 
'<html><head><title>mail sent</title><link rel="stylesheet" type="text/css" href="default.css"/></head><body><table class="topbar" frame="hsides"><tr><td> <div align="center" class="infoform"> okay, is almost done! you just need to confirm your information by clicking the link sent to you via email </div></td></tr></table></body></html>'
}     

dal debug sebra ch'io sbagli la sintassi quando inserisco il messaggio nella variabile, qui:

Codice PHP:
 $testo "welcome to miosito community " $_POST['username']  "!
to activate your account you must only click on the following link:
"
"www.miosito/activate.php?chiavediattivazione=" 
$var  
Thank you for choosing to work with us! :) !"
$from_address ='noreply@miosito.com'$headers 'From: ' $from_address "\r\n"
se è solo questo il problema mi potete suggerire la sintassi corretta per questo genere di caso? grazie mille!!