Advertisement
EBO96

add_user.php

May 4th, 2017
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.70 KB | None | 0 0
  1. <?php
  2. require "init.php";
  3.    
  4.     $username = $_POST["USERNAME"];
  5.     $password = $_POST["PASSWORD"];
  6.     $name = $_POST["NAME"];
  7.     $surname = $_POST["SURNAME"];
  8.     $login_state = $_POST["LOGIN_STATE"];
  9.     $last_category = $_POST["LAST_CATEGORY"];
  10.     $f_lang = $_POST["F_LANG"];
  11.     $s_lang = $_POST["S_LANG"];
  12.    
  13.    
  14.     $sqli = "INSERT INTO `user_info`(`ID`, `USERNAME`, `PASSWORD`, `NAME`, `SURNAME`, `LOGIN_STATE`, `LAST_CATEGORY`, `F_LANG`, `S_LANG`) VALUES (null,'$username', '$password', '$name', '$surname','$login_state','$last_category','$f_lang','$s_lang')";
  15.    
  16.    
  17.     if(mysqli_query($con, $sqli)){
  18.         echo "<br><h3>One Row inserted...</h3>";
  19.     }else{
  20.         echo "Error in insertion..." . mysqli_error($con);
  21.     }
  22.    
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement