
August 25th, 1999, 10:41 AM
|
|
Guest
|
|
Posts: n/a
Time spent in forums:
Reputation Power:
|
|
|
This may help a little bit with the Perl coding:
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
use DBI;
$dbh=DBI->connect("dbi:mysql:$serverName:$databaseName",$mysqlUsername,$mysqlPassword");
$sth=$dbh->prepare("select * from $tableName where member='$login'");
$sth->execute;
if($row=$sth->fetchrow_arrayref){
# Username already taken
print "Sorry.";
}else{
# Put new username in
$dbh->do("insert into $tableName values ('$login','$password','$email')");
print "Thank you.";
}
$sth->finish;
$dbh->disconnect;
[/quote]
That code is just off the top of my head, and I haven't tested it at all, so there may be errors in it, but that should give you a good head start.
|