Advertisement
Guest User

Untitled

a guest
May 29th, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1. <?php
  2.  
  3.     include('db_function.php');
  4.  
  5.     $link=loadDB;
  6.  
  7.     //редактирование данных user
  8.      if (isset($_POST['EditUser']))
  9.      {
  10.          $user_id=quote($_POST["user_id_edit"]);
  11.          $user_name=quote($_POST["user_name_add"]);
  12.          $user_password=quote($_POST["user_password_add"]);
  13.      }
  14.      
  15.      if (!empty($user_name) && !empty($user_password))
  16.      {
  17.          UpdateUser($user_id, $user_name,$user_password);
  18.      }
  19.      else
  20.      {
  21.          echo 'Error! User is not edit';
  22.      }
  23.      
  24.      //удаление user
  25.      if ( isset($_GET['user_id'])   )
  26.      {
  27.         $user_id = trim($_GET['user_id']);
  28.         DeleteUser($user_id);
  29.     }
  30.  
  31.  
  32.     include("index.html");
  33.     closeDB($link);
  34.  
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement