title: clear the URL from $_GET then display a warning message after update
body: <p>The point is to change the user status (active/inactive) from a button, clear the URL from all GET and then display a warning message from bootstrap</p>
  <p>Here the url: <code>http://localhost:8282/userslist.php?deactive=59</code></p>
  <p>What I mean by clear: <code>http://localhost:8282/userslist.php</code></p>
  <p>Display the warning message:</p>
  <p><a href="https://i.stack.imgur.com/CF9JX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CF9JX.png" alt="enter image description here" /></a></p>
  <p>I'm able to clear the URL with a <code>location.href='userslist.php'</code> but my warning message is not displayed (because the refresh hide the message), or, I'm able to display the warning message but I can't clear the URL. I tried to do it separatly with two echo but without any success.</p>
  <p>The button to active/inactive an user are:</p>
  <p><code>http://localhost:8282/userslist.php?deactive=52</code>
  <code>http://localhost:8282/userslist.php?active=52</code></p>
  <p>My code is</p>
  <pre><code>if (isset($_GET['deactive'])) {
      $deactive = preg_replace('/[^a-zA-Z0-9-]/', '', (int)$_GET['deactive']);
      userDeactiveByAdmin($conn, $deactive, $_SESSION[&quot;users_uid&quot;]);
      $getProfile = getProfile($conn, $deactive);
      $username = $getProfile[&quot;users_uid&quot;];
      //echo &quot;&lt;script&gt;location.href='userslist.php';&lt;/script&gt;&quot;;
      echo &quot;&lt;div class='alert alert-warning alert-dismissible fade show text-center' role='alert'&gt;User &lt;strong&gt;\&quot;$username\&quot;&lt;/strong&gt; inactive with success
      &lt;button type='button' class='close' data-dismiss='alert' aria-label='Close'&gt;
      &lt;span aria-hidden='true'&gt;&amp;times;&lt;/span&gt;
      &lt;/button&gt;
      &lt;/div&gt;&quot;;
  }
  </code></pre>
  <p>My function is</p>
  <pre><code>function userDeactiveByAdmin($conn, $id, $username)
  {
      $sql = &quot;UPDATE users SET isActive = 1, updated_by = '$username' WHERE users_id = $id;&quot;;
      $stmt = $conn-&gt;prepare($sql);
      $stmt-&gt;execute();
  }
  </code></pre>
  <p>I don't know how can I do both (clear the URL and display the warning message).</p>