Forums

[SOLVED] record that already exists in the database

menyarito 23 Jun, 2011
Hi,
can be displayed with ChronoForms error messages when the user adds information that already exists in the database, For example in case the user adds an email or phone number
[atchment=1]AFxsnV3Hy_c1.png[/attachent]
and if he repeat the registration
[attachent=0]AFxsxerbQ_c.png[/attachmnt]

Thank you for your help
GreyHead 23 Jun, 2011
Hi menyarito,

You can do that with Ajax - see this extract from the ChronoForms Book.

Bob
menyarito 24 Jun, 2011
Hi GreyHead,

thank you for your reply,

You can do that with Ajax - see this extract from the ChronoForms Book.


is there another method
GreyHead 24 Jun, 2011
Hi menyarito ,

You can do the same with Server Side validation - but that requires the form to be submitted before the checks are run.

Bob
menyarito 25 Jun, 2011
Hi GreyHead,

is there a tutorial that can help me reach my goal because I am not an expert in php,
I tried with this code but it did not work
<?php
global $mainframe;
if(JRequest::getVar('email') not exist in database)
return 'Sorry, email already used!';
?


Thank you in advance
GreyHead 25 Jun, 2011
Hi menyarito,

I already pointed you to a tutorial for the Ajax approach.

If you search here on ServerSide validation you will find several threads - though I'm not sure that you will be able to use them without more PHP/MySQL knowledge. You may need to get someome to help you with this.

Bob
This topic is locked and no more replies can be posted.