What are the potential security risks of displaying sensitive data in the URL in PHP form submission?

Displaying sensitive data in the URL in PHP form submission can lead to security risks such as exposing the data to unauthorized users, making it vulnerable to interception or manipulation. To mitigate this risk, sensitive data should be passed through POST method instead of GET method in form submissions.

<form method="post" action="process_form.php">
  <label for="username">Username:</label>
  <input type="text" id="username" name="username">
  <label for="password">Password:</label>
  <input type="password" id="password" name="password">
  <button type="submit">Submit</button>
</form>