codice:
<?php

include 'db.php';

$message="Ciao $username_check,\n ecco i dati di accesso che hai richiesto:\n
nick: $username\n
password: $random_password\n
A presto!!\n
Staff di $nomesito.\n\n\n\n\n";

mail($email_address, $subject, $message, "From: $sitename <$adminemail>\nX-Mailer: PHP/" . phpversion());

/* Let's do some checking and ensure that the user's email address or username
 does not exist in the database */

$sql_email_check = mysql_query("SELECT email_address FROM users WHERE email_address='$email_address'");
$email_check = mysql_num_rows($sql_email_check);

if(email_check > 0){
echo "<html>
<head>
<meta http-equiv=\"refresh\" content=\"3;url=./index.htm\">
<link rel=\"stylesheet\" type=\"text/css\" href=\"style.css\">
</head>
<body>
<div align=\"center\" class=tit>I dati richiesti sono stati inviati a $email_address</div>
</body>
</html>";
}else{
echo "Si è verificato un errore
non è stato possibile inviare i dati richiesti a $email_address";
}
?>
Questo e' il codice che ho scritto ma nn va'...me la daresti una mano? sono nuovo..anzi nuovissimo al php e sql...
tnx =)