ok my real problem is : that i want to make a register script and the problem is i dont know how to do the script that if an error ocured or password didnt match or emty filed to go back to the register.php and before yhe fields to echo the error
this is my source
<?php
session_start();
session_register("erroare");
//if the mail wasnt set redirect to register ,php and save the error
if(!isset($_POST[mail])){
$erroare="nai mail";
header("location: http//lcoalhost/register.php");
}else{
echo "bbbb";
}
?>
<html>
<head>
<title>.:REGISTER:.</title>
</head>
<body>
<br>
<h1><center><b>Register Form</b></center></h1>
<br>
<Br> <!-- here he must echo the error -->
<?php session_start();
echo $eroare;
?>
<br>
<form action="register.php" method="POST">
<input type="text" name="mail" size="30"><br><br>
</form>
</body>
</html>