Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Form validation during database Record Update (dreamweaver/php/sql)

Guest
Jun 01, 2009 Jun 01, 2009

Copy link to clipboard

Copied

I  am using the Dreamweaver Update Record Wizard to update my database records.  Basically, Dreamwevar creates for you an update form and then writes it to the database when you click the submit button on the form. 

I edited the update form to include onsubmit="return MyValidateFields(this);"  to validate my fields before writing them to the database. MyValidateFields() is just a JavaScript function I wrote to validate fields such as password, username, etc.  This method works very well with the Insert Record behavior,  but I am not getting it to work with the Update Record Behavior.  It looks as though when the submit button is clicked the MyValidateFields function is not even invoked. Am I doing something wrong, or is it because this onsubmit feature can not be used with the Update Record behavior? Any ideas?

TOPICS
Server side applications

Views

1.4K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 01, 2009 Jun 01, 2009

Copy link to clipboard

Copied

Your form validation will not work for anyone that has javascript disabled.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 01, 2009 Jun 01, 2009

Copy link to clipboard

Copied

Thanks for the answer.  What method then (other than JavaScript validation) which will  never be disabled can  I use?

Also do you have an answer to my first question?  Thanks.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Jun 01, 2009 Jun 01, 2009

Copy link to clipboard

Copied

You should use server side validation such as php, asp, coldfusion, etc. where the data is validated on the server side. You can combine js and server side validation so users with js enabled will validate the form on client side without page reload and server side validation is used if javascript is disabled.

On regard to your first question I can't see your code so I can't speculate as to what your issue is besides the speculations you've already presented.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 01, 2009 Jun 01, 2009

Copy link to clipboard

Copied

Thanks again for the reply.  My site's functionality is all implemented alread. All I have left to do is to complete the form validation.

But I seem to be stuck with the validation stuff.  I am new at php coding, and I guess for now I will need to find some php based routines so I can do my validation on the server side.  I basically need to validate username, passsword and email.  Do you know of any public php code implementing this stuff?

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 25, 2009 Jun 25, 2009

Copy link to clipboard

Copied

LATEST

I am closing this as the problem has disaapeared.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines