safest way to let users with no login to delete mysql entry

so heres the problem,i have an if() statement that determines whether a user has visited my site before, if they have then they have an option for removing their record from the database. Problem is,...