Нема описа

deleteEvent.php 549B

12345678910111213141516171819202122232425262728
  1. <?PHP
  2. //---------------
  3. // Connection to server and database
  4. //---------------
  5. $host = "localhost";
  6. $basedatos = "techos";
  7. $user = "pablo.puig1";
  8. $passw = "9NA3kSExI2fGE6eV";
  9. try{
  10. $connection = mysqli_connect($host, $user, $passw, $basedatos) or $error = 1;
  11. }
  12. catch(Exception $ex){
  13. print("Error connecting to database: ". $ex->getMessage()) and die();
  14. }
  15. ?>
  16. <?PHP
  17. $EID = $_POST['EID'];
  18. $queryDeleteUser = "DELETE FROM events WHERE EID = $EID";
  19. mysqli_query($connection, $queryDeleteUser);
  20. header("Location: eventsTable.php");
  21. exit();
  22. ?>