Salve a tutti , stavo provando a svolgere un compito di un esame di php.
Il compito richiede quanto segue :
Date due form utente e password , bisogna verificare che la password sia l'inversa dell'username. In caso affermativo bisogna stampare a video login effettuata, in caso contrario password errata.

Es. (username abc , password cba : login effettuata)
(username abc, passowrd aaa : login errata)

Sono risciuto a fare tutto , ma appena clicco sul tasto invia , ovviamente stampo il risultato sotto le due form. Vorrei invece che una volta fatto il controllo le form spariscono ed esce solo il messaggio "login effettuata" o "login errata"

Come posso risolvere?

Vi posto comunque il mio codice

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="it" xml:lang="it">
<head>
<title>Login</title>
</head>
<body>
<form name="f1" action="log.php" method="post">
<table border="0">
<tr>
<td>Login:</td><td><input type="text" name="user" /></td>
</tr>
<tr>
<td>Password:&nbsp&nbsp</td><td><input type="password" name="pwd" /></td>
</tr>
</table>
<br/>
<input type="submit" name="Ok" value="Entra" />
</form>
<?php

if(isset($_POST['user'])&& ($_POST['pwd'])){



if($_POST['user']==(strrev($_POST['pwd']))){


print"Login effettuata";

}
else {
print"Credenzili errate";
}

}
else {
print "Non hai inserito password e username correttamente";
}
?>
</body>

</html>