Prepared statements are the standard for secure programming. In PDO, instead of directly inserting values
into an SQL string, we use named parameters (e.g., :name). This separates SQL logic from
data, which prevents SQL injection attacks.
The process follows three steps: first, we prepare the statement (prepare), then we bind
variables to it (bindParam), and finally, we execute the command (execute).
Below, we will securely add a new member to the users table.
:email) make the code much more readable.bindParam() method binds an SQL parameter directly to a PHP variable.