Advertisement
aguz99

proses_id.php

Jul 5th, 2017
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.77 KB | None | 0 0
  1. <?php
  2.  
  3.     include_once("/ssh/function/helper.php");
  4.     include_once("/ssh/function/connection.php");
  5.  
  6.     $username = $_POST['username'];
  7.     $password = $_POST['password'];
  8.     $server = "INDONESIA";
  9.     $status = "mati";
  10.  
  11.     $dataForm = http_build_query($_POST);
  12.  
  13.     $query = mysqli_query($connection, "SELECT * FROM user WHERE username='$username'");
  14.  
  15.     if (empty($username) || empty($password)) {
  16.         header("location: /ssh/index.php?page=main&notif=require&$data");
  17.     }elseif (mysqli_num_rows($query) == 1) {
  18.         header("location: /ssh/index.php?page=main&notif=username&data");
  19.     }else{
  20.         mysqli_query($connection, "INSERT INTO user (username, password, server, status)
  21.                                     VALUES ('$username', '$password', '$server', '$status')");
  22.         header("location: /ssh/index.php?page=konfirm");
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement