12345678910111213141516171819202122232425262728 |
- <?PHP
-
- //---------------
- // Connection to server and database
- //---------------
-
- $host = "localhost";
- $basedatos = "techos";
- $user = "pablo.puig1";
- $passw = "9NA3kSExI2fGE6eV";
-
- try{
- $connection = mysqli_connect($host, $user, $passw, $basedatos) or $error = 1;
- }
- catch(Exception $ex){
- print("Error connecting to database: ". $ex->getMessage()) and die();
- }
-
- ?>
-
- <?PHP
- $UID = $_POST['UID'];
-
- $queryDeleteUser = "DELETE FROM users WHERE UID = $UID";
- mysqli_query($connection, $queryDeleteUser);
- header("Location: usersTable.php");
- exit();
- ?>
|