Gossamer Forum
Home : Products : DBMan : Installation :

Uniq Email?

Quote Reply
Uniq Email?
DBMAN is a wonderful script!, I'm working on a mailinglist manager based on DBMAN 2.01. With some nice featurs like "User approving" of subscribsions, to avoid beening accused of spamming. To make everything work i need to be sure of that the field "Email" is uniq.

So I need to modify "sub validate_records", The problem is that I don't have any idears what to do. Alex could you help me?

Here is "sub validate_records"

if ($in{'add_record'}) { # don't need to worry about duplicate key if modifying
open (DB, "<$db_file_name") or &cgierr("error in validate_records. unable to open db file: $db$
LINE: while (<DB> ) {
(/^#/) and next LINE;
(/^\s*$/) and next LINE;
$line = $_; chomp ($line);
($id, @rest) = &split_decode($line);

if ($id eq $in{$db_key}) {
return "duplicate key error";
}
}
close DB;
}

Cheers,

Jonas
Subject Author Views Date
Thread Uniq Email? jonas 2711 Dec 1, 1998, 9:04 AM
Post Re: Uniq Email?
Alex 2630 Dec 1, 1998, 1:09 PM