close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Check if Email Exists on update - is there a better way

Thread began 1/13/2011 4:52 pm by Andrew Read | Last modified 1/14/2011 7:01 am by Jason Byrnes | 958 views | 1 replies |

Andrew Read

Check if Email Exists on update - is there a better way

Hello,

I am using server side validation from the form toolkit on a DataAssist update form.

I have a recordset which is returning a value of 1 in $totalRows_BLAH if the email address exists already, however, on update if the value is not changed it returns a value of 1 because the unchanged email is already in the database. I have gotten around this in the past like this:

php:
if ($_POST['users_email'] == $row_WADAusers['users_email']) {
        $WAFV_Errors .= WAValidateNM($totalRows_chkEmailUnique . "",0,1,"",",.",true,1);
} else {
        $WAFV_Errors .= WAValidateNM($totalRows_chkEmailUnique . "",-1,0,"",",.",true,1);
}

The issue with this is that the statement gets overwritten if I update or add another server validation. I have been keeping this code safe close by with a commented out php section so that I can repaste it when I need to.

My question is - is there a better way? :)

Sign in to reply to this post

Jason ByrnesWebAssist

No, this is the best way to accomplish this in an update situation.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...