Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <link href="styles/style.css" rel="stylesheet" type="text/css">
- <link href="styles/background.css" rel="stylesheet" type="text/css">
- <link href="styles/body.css" rel="stylesheet" type="text/css">
- <link href="styles/title.css" rel="stylesheet" type="text/css">
- <link href="styles/head.css" rel="stylesheet" type="text/css">
- <link href="styles/menu.css" rel="stylesheet" type="text/css">
- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Lobster" />
- <meta charset="utf-8">
- <title>Acceuil</title>
- <h1>
- <d> Acceuil TP </d>
- </h1>
- <br>
- <h7>
- <h7>
- <br>
- <form method="post" action="ton_action">
- <p>
- </p>
- </form>
- </h4>
- <br>
- </head>
- <body>
- <br>
- <d> En classe de : </d>
- <br>
- <br>
- <div class='ribbon'>
- <a href='Page 1.html'><span>TP 6eme</span></a>
- <a href='Page 2.html'><span>TP 5eme</span></a>
- <a href='Page 3.html'><span>TP 4eme</span></a>
- <a href='Page 4.html'><span>TP 3eme</span></a>
- </div>
- <br>
- <br>
- <?php
- if(isset($_POST['submit']))
- {
- $username =htmlentities(trim($_POST['username']));
- $password =htmlentities(trim($_POST['password']));
- $repeatpassword = htmlentities(trim($_POST['repeatpassword']));
- if($username&&$password&&$repeatpassword)
- {
- if($password==$repeatpassword)
- {
- $bdd = new PDO('mysql:host=localhost;phplogin;charset=utf8', 'root', '');
- $bdd->exec('INSERT INTO user(id, username, password) VALUES(NULL, \'$username\', \'$password\')');
- $reponse = $bdd->query('SELECT * FROM user');
- die("Inscription terminée,connéctez vous");
- }else echo"Les deux mots de passe doivent être identique";
- }else echo"Veuillez saisir tout les champs";
- }
- ?>
- <form method="POST" action="register.php">
- <p> Votre identifiant :</p>
- <input type="text" name="username">
- <p> Mot de passe :</p>
- <input type="password" name="password">
- <p> Repetez votre mot de passe </p>
- <input type="password" name="repeatpassword">
- <input type="submit" value="S'inscrire" name="submit">
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement