What are the potential security risks of passing sensitive data like passwords using GET parameters in PHP?

Passing sensitive data like passwords using GET parameters in PHP poses a security risk because the data is visible in the URL, which can be easily accessed and viewed by anyone, including malicious users. To mitigate this risk, sensitive data should be passed using POST parameters instead, which are not visible in the URL.

<form method="post" action="process_data.php">
    <input type="text" name="username" placeholder="Username">
    <input type="password" name="password" placeholder="Password">
    <button type="submit">Submit</button>
</form>