Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* <?php require_once("includes/connection.php"); ?>
- <?php
- if(isset($_POST["register"])){
- if(!empty($_POST['full_name']) && !empty($_POST['email']) && !empty($_POST['username']) && !empty($_POST['password'])) {
- $full_name= htmlspecialchars($_POST['full_name']);
- $email=htmlspecialchars($_POST['email']);
- $username=htmlspecialchars($_POST['username']);
- $password=htmlspecialchars($_POST['password']);
- $query=mysqli_query("SELECT * FROM usertbl WHERE username='".$username."'");
- $numrows=mysql_num_rows($query);
- if($numrows==0)
- {
- $sql="INSERT INTO usertbl
- (full_name, email, username,password)
- VALUES('$full_name','$email', '$username', '$password')";
- $result=mysqli_query($sql);
- if($result){
- $message = "Account Successfully Created";
- } else {
- $message = "Failed to insert data information!";
- }
- } else {
- $message = "That username already exists! Please try another one!";
- }
- } else {
- $message = "All fields are required!";
- }
- }
- ?>
- <?php if (!empty($message)) {echo "<p class=\"error\">" . "MESSAGE: ". $message . "</p>";} ?>
- */
- <?php include("includes/header.php") ?>
- <div class="container mregister">
- <div id="login">
- <h1> ^ ^ ^ ^ ^ </h1>
- <form action="register.php" id="registerform" method="post"name="registerform">
- <p><label for="user_login"> ^ ^ <br>
- <input class="input" id="full_name" name="full_name"size="32" type="text" value=""></label></p>
- <p><label for="user_pass">E-mail<br>
- <input class="input" id="email" name="email" size="32"type="email" value=""></label></p>
- <p><label for="user_pass"> ^ ^ ^ ^ ^ <br>
- <input class="input" id="username" name="username"size="20" type="text" value=""></label></p>
- <p><label for="user_pass"> ^ ^ ^ <br>
- <input class="input" id="password" name="password"size="32" type="password" value=""></label></p>
- <p class="submit"><input class="button" id="register" name= "register" type="submit" value=" ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ "></p>
- <p class="regtext"> ^ ^ ^ ^ ^ ^ ? <a href= "login.php"> ^ ^ ^ ^ ^ ^ </a>!</p>
- </form>
- </div>
- </div>
- <?php include("includes/footer.php"); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement