CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> PHP

 Custom error display

Print topic Send  topic

Author Message
Ivanmx
Posted: 08/26/2004, 9:10 AM

Hi.

How can i custom errors?

For example , in a form register include email (control source) and in the table this field is Unique.
Then when a user try to put the same email that exist in the data base send this error in the browser:

MySQL Error: 1062 (Duplicate entry 'isotelo@iisa.net' for key 2)

How can change this error with a page that say " this mail is already in use"

Thanks..
Karsten
Posted: 08/26/2004, 9:32 PM

look at the Data->Properties->Unique thing for the textbox where the user types his emailadress.




Damian
Posted: 08/27/2004, 7:41 AM

But how do you customise the error message?

"Karsten" <Karsten@forum.codecharge> wrote in message
news:5412eb941788ec@news.codecharge.com...
> look at the Data->Properties->Unique thing for the textbox where the user
types
> his emailadress.
>
>
>
>
>
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

Karsten
Posted: 08/27/2004, 2:39 PM

the easiest fastest RAD way in this case is to edit the .php file manually :-(

the Unique property generates a piece of code in the .php file of the page
this code piece checks with a call to CCDLookUp if the value exists already in the database and if so it adds an Error to the Error object

you can change this errormessage

look in the .php file of the form/page in the Validate Method
( function validate() ) there you can read and change the errorstring.

but do this at LAST if you are ready with everything other because you will kill maybe the consitence of the stringparser for properties, this happens in MY case if i edit a .php file i cant use the Validation rule /validate text properties anymore, because the parser dont recognizes a delete/add of this properties anymore and dont writes/deletes code in the .php anymore. but as i said this happens to ME i dont know if it works on your version better, give it a try and test this.


Add new topic Subscribe to topic   


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.