If you want more of my pastes visit:  https://randompaste.000webhostapp.com/index.html
--------------------------------------------------------------------------------------

<?php include("db.php"); ?>
<!DOCTYPE html>
<html>
<head>
    <title>EasySchool</title>
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="css/styles.css">
    <link rel="shortcut icon" href="img/schoolwin.png">
	
</head>
<body>

       <?php include("include/navbar.php"); ?>

         <h1>Inscription </h1>


    <form method="post" class="forminscription">
         <input type="text" name="pseudo" id="pseudo" class="inputbasic">
         <input type="password" name="password" id="password" class="inputbasic">
         <input type="email" name="email" id="email" class="inputbasic mail">
         <input type="text" name="name" id="name" class="inputbasic">
         <input type="text" name="surname" id="surname" class="inputbasic">
         <input type="submit" name="formsend" id="formsend">
     </form>

     <?php if(isset($_POST['formsend'])){

          	  $pseudo = $_POST['pseudo'];
          	  $password = $_POST['password'];
          	  $email = $_POST['email'];
          	  $name = $_POST['name'];
          	  $surname = $_POST['surname'] ;

          if(!empty($pseudo) && !empty($password) && !empty($email) && !empty($name) && !empty($surname)){    	            	            	  

        	$options = [
    			'cost' => 12,
			];

			$hashpass = password_hash($password, PASSWORD_BCRYPT, $options);

			$req = $pdo->prepare('INSERT INTO user SET username =  ?, password = ?, email =  ?, name = ?, surname = ?');
			$req->execute([
        		$pseudo,
       			$hashpass,
	       		$email,	
       		    $name,
       		    $surname	
				]);
			
    }

     } ?>

      <?php include("include/footer.php"); ?>

</body> 

</html>