What potential pitfalls could arise when relying solely on email addresses to differentiate between new and existing customers in PHP?

Relying solely on email addresses to differentiate between new and existing customers in PHP can lead to potential pitfalls such as email address duplication or customers changing their email addresses. To solve this issue, it is recommended to use a unique identifier for each customer, such as a customer ID, in addition to the email address.

// Assuming $email contains the email address of the customer
// Generate a unique customer ID using a hash function
$customer_id = md5($email);

// Check if the customer ID already exists in the database
// If it does, then the customer is an existing customer
// If it doesn't, then the customer is a new customer