Re: Chec db if username is already there

From: Date: Thu, 19 Oct 2000 19:29:09 +0000
Subject: Re: Chec db if username is already there
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-21244@lists.php.net to get a copy of this message
Never mind, I must of been brain dead when I asked this stupid question. Gary Gary wrote: > Thanks to everyone for the help. I do have a follow up question. I am testing > this on a in-house test server, without mail. If I want to test live I have to > change everything to php. Before I do that should I move the mail() after the > sql to prevent it from being sent until the check for username is finished? > > Gary > > David Robley wrote: > > > On Thu, 19 Oct 2000, Gary wrote: > > > Hello, > > > I am fairly new to php and need some help. I have written a sign-up and > > > need to find out if the user name and or the email address are already > > > in the database. > > > > Just do a query on the table along the lines of SELECT COUNT(*) AS num FROM > > table WHERE username = '$username' and check the returned value of num; if > > it is zero the anme doesn't exist, otherwise it does. > > > > -- > > David Robley | WEBMASTER & Mail List Admin > > RESEARCH CENTRE FOR INJURY STUDIES | > > http://www.nisu.flinders.edu.au/ > > AusEinet | > > http://auseinet.flinders.edu.au/ > > Flinders University, ADELAIDE, SOUTH AUSTRALIA > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- The sad thing about artificial intelligence is that it lacks artifice and therefore intelligence. Jean Baudrillard (1929), French semiologist.

« previous php.general (#21244) next »