What are some potential security concerns to be aware of when implementing email address creation with PHP on a website?

One potential security concern when implementing email address creation with PHP is the risk of SQL injection attacks if user input is not properly sanitized. To prevent this, it is important to use prepared statements or parameterized queries when interacting with the database to avoid malicious SQL injection attempts.

// Using prepared statements to insert email address into database
$email = $_POST['email'];

$stmt = $pdo->prepare("INSERT INTO users (email) VALUES (:email)");
$stmt->bindParam(':email', $email);
$stmt->execute();