Location: PHPKode > projects > Twisty Forum > twisty-forum/forum/valrecord.php
<?php 
session_start();
include('coords.inc.php');

ini_set('arg_separator.output','&amp;'); 
ini_set('url_rewriter.tags','get=fakeentry'); 
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Twisty Forum - Enregistrement</title>
<link rel="StyleSheet" type="text/css" href="index.css" />
</head>
<body>
<?php
include ('haut.inc');

$nom=$_POST['nom'];
$pass=$_POST['pass'];
$logo=$_POST['logo'];
$site=$_POST['site'];
$mail=$_POST['mail'];
$pub=$_POST['pub'];
$nom=trim($nom);
$pass=trim($pass);
$logo=trim($logo);
$mail=trim($mail);
$nom=strtolower($nom);
$pass=strtolower($pass);

if($pub==false){$pub='non';}
else{
$pub='oui';};

$verif=mysql_query("select id from fusers where nom='$nom'");
$verif3=mysql_num_rows($verif);
if($verif3 != 0){
echo '<div style="text-align:center;clear:left"><h3>Ce pseudonyme est déjà pris.</h3>';
echo '<p><a class="accueil" href="record.php">recommencer l\'enregistrement</a></p>';
}
else{
if((eregi('[^a-z0-9 ]',$nom)==false)&&
(eregi('[^a-z0-9 ]',$pass)==false)&&
(strlen($nom)>2)&&
(strlen($nom)<16)&&
(strlen($pass)>2)&&
(strlen($pass)<10)){
mysql_query("insert into fusers(nom,pass,site,mail,pub) values('$nom','$pass','$site','$mail','$pub')") or die("eh merde...");


$bienvenue=ereg_replace("\n","<br />",$bienvenue);
$bienvenue=stripslashes($bienvenue);

$entete  ="Content-type:text/html";

mail($adminmail,'logo proposé par '.$nom,$logo,$entete,'-f'.$forummail);
mail($mail,'Bienvenue sur HTML, etc.',$bienvenue,$entete,'-f'.$forummail);

echo '<div style="text-align:center;clear:left"><h3>Vous êtes maintenant enregistré et connecté.</h3>';
$_SESSION['nom']=$nom;
echo '<p><a class="accueil" href="index.php">accueil du forum</a></p>';
}
else{
echo '<div style="text-align:center;clear:left"><h3>Vérifiez votre saisie.</h3>';
echo '<p><a class="accueil" href="record.php">recommencer l\'enregistrement</a></p>';
};
};
?>
</div>

<p style="margin-top:50px;color:white;clear:left">
<a class="liensite" href="http://javatwist.imingo.net">© Javatwist 2002</a> - JavaTwisting people
</p>
</body>
</html>
Return current item: Twisty Forum