CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Disallowing Registration

Print topic Send  topic

Author Message
brf
Posted: 06/04/2003, 6:37 AM

I am trying to prevent registration if the login and password are already in registration table. Login and PW form a unique key in access table. Using asp in the beforeinsert event of form I can dlookup the Login and pw to see if its there, but I can't seem to cancel the insert and return an error message like 'You are Already registered'.

Any thoughts appreciated.
rclayh
Posted: 06/04/2003, 9:28 AM

Just set unique to yes on the form field properties in Code Charge Studio. You can also set the database to require a unique login which will disallow dupes or make the login the primary key for the table.
RonB
Posted: 06/04/2003, 2:58 PM

add something like the code below in the on validate event.

global $NewRecord1;
$db=new clsDBConnection1;
if (CCGetDBValue("select login from login where login=".CCToSQL($NewRecord1->login->GetValue(),"ccsText"),$db)!="")
{
$NewRecord1->Errors->addError("This UserName is allready in use");
}


Ron
brf
Posted: 06/04/2003, 6:01 PM

Thx for the clear and appropriate meneuvers
brf
glerma
Posted: 06/05/2003, 6:19 PM

Don't feel stupid. Feel enlightened.

:)
feha
Posted: 06/06/2003, 4:49 AM

You shouldn't set the password field to unique, it will SHOW that someone has that password ...
Just set username to unique ...





regards
feha
[www.vision.to]

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.