Re: Chec db if username is already there

From: Date: Thu, 19 Oct 2000 00:28:20 +0000
Subject: Re: Chec db if username is already there
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-21023@lists.php.net to get a copy of this message
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

« previous php.general (#21023) next »