editTag.php 450 B

12345678910111213141516
  1. <?php
  2. require_once 'conn.php';
  3. checkLogin();
  4. $originaltag = $_GET['originaltag'] ?? '';
  5. $newtag = $_GET['newtag'] ?? '';
  6. $originaltag = textEncode(urldecode($originaltag));
  7. $newtag = textEncode(urldecode($newtag));
  8. $sql = "UPDATE tagtable SET tagName='" . $conn->real_escape_string($newtag) . "'
  9. WHERE tagName='" . $conn->real_escape_string($originaltag) . "'
  10. AND employeeId=" . $_SESSION['employee_id'];
  11. $conn->query($sql);
  12. ?>