Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- if(isset($_POST['submit']))
- {
- $username = htmlspecialchars(trim($_POST['username']));
- $password = htmlspecialchars(trim($_POST['password']));
- $repeatpassword = htmlspecialchars(trim($_POST['repeatpassword']));
- $email = htmlspecialchars(trim($_POST['email']));
- if($username&&$password&&$repeatpassword&&$email)
- {
- if(filter_var($email,FILTER_VALIDATE_EMAIL))
- {
- if($password==$repeatpassword)
- {
- $password = md5($password);
- $repeatpassword = md5($repeatpassword);
- $connect = mysql_connect('127.0.0.1','mysql','');
- mysql_select_db('logins-data');
- $reg = mysql_query("SELECT * FROM logins-place WHERE name='$username'");
- $rows = mysql_num_rows($reg);
- if($rows==0)
- {
- $token = rand('100000','99999');
- $query = mysql_query("INSERT INTO logins VALUES('','$username','$password','$repeatpassword','$email',$token','0')");
- die("Inscription réussie <a href='login.php'>connéctez</a> vous");
- }else echo"Ce pseudo n'est pas disponible";
- }else echo"Les deux passwords doivent être identiques";
- }else echo"Veuillez saisir tous les champs";
- }else echo"Veuillez saisir un email valide";
- }
- ?>
- <table align="center" border="0" width="220" cellspacing="0" cellpadding="0">
- <tr>
- <td width="100%">
- <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#000000"><tr>
- <form method="POST" action="reg1.php" onsubmit="">
- <input type="hidden" name="id" value="15466">
- <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td width="100%" colspan="2" bgcolor="#000000"><p align="center"><b><font face="Verdana" size="2" color="#FFFFFF">
- Zone connextion</font></b></td></tr>
- <tr><td width="60%" bgcolor="#3D76A7"><p align="right"><font face="Verdana" size="2" color="#000000">
- Psedo: </font></p></td><td width="44%" bgcolor="#3D76A7"><p align="left"><font face="Verdana" size="2"><input type="text" name="login" size="10"> </font></p></td></tr>
- <tr><td width="60%" bgcolor="#3D76A7"><p align="right"><font face="Verdana" size="2" color="#000000">
- Mot de passe: </font></p></td><td width="44%" bgcolor="#3D76A7"><p align="left"><font face="Verdana" size="2"><input type="password" name="password" size="10"> </font></p></td></tr>
- <tr><td width="100%" colspan="2" bgcolor="#3D76A7"><p align="center"><input type="submit" value="Login" name="submit" onclick="this.value='Loading...'"></td></tr>
- <tr><td width="100%" colspan="2" bgcolor="#000000"><p align=center><font size="2" face="Verdana" color="#FFFFFF">
- [ <a style="color:#FFFFFF" href="#" onClick="-ajouter une action-">Inscrivez-vous</a> ]<br>
- [ <a style="color:#FFFFFF" href="#" onClick="-ajouter une action-">Gérer votre compte</a> ]<br>
- [ <a style="color:#FFFFFF" href="#" onClick="-ajouter une action-">Oublié ?</a> ]
- </font></td>
- </tr></table></td></form></tr></table></td></tr></table>
Add Comment
Please, Sign In to add comment