[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-users] CGI Script Question



Hello,

> I am making s sign up page for customers and I was wordering 
> if any of you 
> know how to make a script (.pl or .cgi) that can check to see 
> if a username 
> is taken by any of the virtual sites?

If you just need to know the syntax, you need to use the getpwnam(3)
structure like this (perl code, where $name is a string holding the name
entered in the form):

if (getpwnam($name)) {
	print "$name exists\n";
} else {
	print "$name does not exist\n";
}

If you need an actualy CGI script written around this, we can write one for
you.

Regards,
Jonathan Michaelson

Way to the Web Ltd
Commercial CGI Scripting, Web Hosting
http://www.waytotheweb.com