<?php #userRegister.php
require_once("connection.php"); # $con
$firstName=addslashes($_POST['firstName']);
$lastName=addslashes($_POST['lastName']);
$username=addslashes($_POST['username']);
$psw=sha1($_POST['psw']);
require_once("token.php"); # $token
$sql="CALL register_username ('$firstName', '$lastName', '$username', '$psw', '$token')";
mysqli_query($con, $sql) or die($sql);
header("Location:mail/userActivation.php");
?>
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> | |
| <meta name="description" content="" /> | |
| <meta name="author" content="" /> | |
| <title>Register - SB Admin</title> | |
| <link href="css/styles.css" rel="stylesheet" /> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/js/all.min.js" crossorigin="anonymous"></script> | |
| </head> | |
| <body class="bg-primary"> | |
| <div id="layoutAuthentication"> | |
| <div id="layoutAuthentication_content"> | |
| <main> | |
| <div class="container"> | |
| <div class="row justify-content-center"> | |
| <div class="col-lg-7"> | |
| <div class="card shadow-lg border-0 rounded-lg mt-5"> | |
| <div class="card-header"> | |
| <h3 class="text-center font-weight-light my-4">Create Account</h3> | |
| </div> | |
| <div class="card-body"> | |
| <form action="userRegister.php" method="post"> | |
| <div class="row mb-3"> | |
| <div class="col-md-6"> | |
| <div class="form-floating mb-3 mb-md-0"> | |
| <input required name="firstName" class="form-control" id="inputFirstName" type="text" placeholder="Enter your first name" /> | |
| <label for="inputFirstName">First name</label> | |
| </div> | |
| </div> | |
| <div class="col-md-6"> | |
| <div class="form-floating"> | |
| <input required name="lastName" class="form-control" id="inputLastName" type="text" placeholder="Enter your last name" /> | |
| <label for="inputLastName">Last name</label> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="form-floating mb-3"> | |
| <input required name="username" class="form-control" id="inputEmail" type="email" placeholder="name@example.com" /> | |
| <label for="inputEmail">Email address</label> | |
| </div> | |
| <div class="row mb-3"> | |
| <div class="col-md-6"> | |
| <div class="form-floating mb-3 mb-md-0"> | |
| <input required name="psw" class="form-control" id="inputPassword" type="password" placeholder="Create a password" /> | |
| <label for="inputPassword">Password</label> | |
| </div> | |
| </div> | |
| <div class="col-md-6"> | |
| <div class="form-floating mb-3 mb-md-0"> | |
| <input class="form-control" id="inputPasswordConfirm" type="password" placeholder="Confirm password" /> | |
| <label for="inputPasswordConfirm">Confirm Password</label> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="mt-4 mb-0"> | |
| <div class="d-grid"> | |
| <button type="submit" class="btn btn-primary btn-block">Create Account</button> | |
| </div> | |
| </div> | |
| </form> | |
| </div> | |
| <div class="card-footer text-center py-3"> | |
| <div class="small"><a href="login.html">Have an account? Go to login</a></div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| </div> | |
| <div id="layoutAuthentication_footer"> | |
| <footer class="py-4 bg-light mt-auto"> | |
| <div class="container-fluid px-4"> | |
| <div class="d-flex align-items-center justify-content-between small"> | |
| <div class="text-muted">Copyright © Your Website 2021</div> | |
| <div> | |
| <a href="#">Privacy Policy</a> · | |
| <a href="#">Terms & Conditions</a> | |
| </div> | |
| </div> | |
| </div> | |
| </footer> | |
| </div> | |
| </div> | |
| <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script> | |
| <script src="js/scripts.js"></script> | |
| </body> | |
| </html> |
Sem comentários:
Enviar um comentário