Location: PHPKode > projects > petitforum > petitforum/inscription.php
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<title>Inscription</title>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<p id="titre">Inscription</p>
<FORM method="post">
  <?
	if (($name) && ($pass) && ($mel))
    {
	$name=ereg_replace(":", "",$name);
	$mel=ereg_replace(":", "",$mel);
	$passc=crypt($pass,"leforumlamathosphere");
	$passc=ereg_replace(":", "",$passc);
	$liste = "$name:$passc:$mel\n";
	$flag=true;
    $fp = fopen ("secret/liste.txt", "r");
	while (!feof($fp)) {
		$lignee = fgets($fp, 4096);
		$ligne[$i]=explode(":",$lignee);
		if ($ligne[$i][0]==$name) $flag=false;
		$i++;
	}
	fclose($fp);
	if ($flag==true) {
		$fp = fopen("secret/liste.txt","a");
    	fwrite ($fp, $liste);
		fclose ($fp);
		echo "Inscription r&eacute;ussie !";
		echo "</form><p align=\"center\">- <a href=\"message.php?nom=".$name."&pass=".$pass."\">Retour au forum</a> - </body></html>";
		die();
	} else {
		echo "</form>Ce nom est d&eacute;j&agrave; utilis&eacute; !</body></html>";
	}	
}
?>
<h1> Inscrivez-vous :</h1>
  <p align="left"><b>Nom :</b><br>
    <input name="name" type="text" size="15">
    <br>
  <b>Mot de passe :</b><br>
    <input name="pass" type="password" size="15">
    <br>
  <b>M&eacute;l :</b><br>
    <input name="mel" type="text" size="25">
    <br>
    <input name="submit" type="submit" value="Envoyer">
</p>
</FORM>
<hr>
<p align="center">- <a href="message.php" target="_top">forum</a> - <br>
  <br>
  <font size=-2>2002 - petitforum</font> </p>
</body>
</html>
Return current item: petitforum