Problema campi obbligatori
Salve! ho creato uno script in PhP :
<?PHP
$nome_file="dati.txt";
$file=fopen ($nome_file);
$nome1=$_POST['nome'];
$email1=$_POST['email'];
$pass1=$_POST['pass'];
{
if (empty($nome1) | empty($email1) | empty($pass1)){
echo "<strong>Riempi i Dati richiesti</strong>";
}
else {
fputs($file, $nome1."|".$email1."|".$pass1."\n");
fclose($file);
echo "<b>Registrazione eseguita!</b>";
echo "I dati inseriti sono:";
echo "Nome: <b> $nome1 </b>";
echo "Email: <b> $email1 </b>";
echo "Password: <b> $pass1 </b>";
}
}
?>
Ma anche se riempio i campi richiesti mi dice che devo riempire i campi richiesti :|
qual'è il problema?