Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solved App crashes when entering an existing email ID saved in info_table #119

Merged
merged 6 commits into from
Oct 14, 2024

Conversation

ygowthamr
Copy link
Contributor

@ygowthamr ygowthamr commented Oct 14, 2024

Pull Request Description: Handle Duplicate Email Registration

Overview

This pull request addresses the issue of duplicate email registrations in the application. It implements a check to verify whether an email address already exists in the database before allowing a user to register. If a duplicate email is detected, the application will now display an appropriate message to the user, preventing the registration process and enhancing the overall user experience.

Changes Made

  • Email Existence Check: Added a query to check if the email already exists in the info_table during the registration process.
  • User Feedback: Implemented a user-friendly error message when a duplicate email is found, guiding the user to either choose a different email or log in to their existing account.
  • Code Refactoring: Ensured proper error handling and connection management during the database operations.
  • Code Changes:
  • I have added/modified code in form_filling.html file in the following lines : 84-86,115,141-143.
  • In form_db.js file the changes are , modified info function

Example Error Message

  • "This email address is already registered. Please use a different email."

Additional Notes

image

Fixes #116
@Harshdev098 Pls add labels like label3,gssoc, and hacktoberfest accepted.

@ygowthamr
Copy link
Contributor Author

@Harshdev098
Pls add labels level3,hacktoberfest accepted, and gssoc extended to this pull request.

@ygowthamr
Copy link
Contributor Author

ygowthamr commented Oct 14, 2024

@Harshdev098
I have resolved all the conflicts in the code pls merge my pr.

public/form_filling.html Outdated Show resolved Hide resolved
@@ -84,7 +91,7 @@
<option value="Lakshadweep">Lakshadweep</option>
<option value="Ladakh">Ladakh</option>
<option value="Puducherry">Puducherry</option>
<option value="Jammu and Kashmir">Jammu and Kashmir</option>
<option value="Jammu and Kashmir">Jammu and Kashmir</option
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't delete the tag

<option value="Uttar Pradesh">Uttar Pradesh</option>
<option value="Madhya Pradesh">Madhya Pradesh</option>
<option value="Tamil Nadu">Tamil Nadu</option>
<option value="Maharashtra">Maharashtra</option>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also you have duplicated the options in State like UP and MP...

const sqlInsert = mysql.format(sql, [
userid,
name,
email,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also make these mysql fields in one line

@Harshdev098
Copy link
Owner

Also update your PR description to add the issue number you are solving Fixes #<issue_number>

@ygowthamr
Copy link
Contributor Author

@Harshdev098
Updated pls check and let me know

@ygowthamr
Copy link
Contributor Author

ygowthamr commented Oct 14, 2024

@Harshdev098
There is some issue regarding the docker configuration from you side pls check.
I have updated the code accordingly.

@Harshdev098
Copy link
Owner

Will see it

@ygowthamr
Copy link
Contributor Author

@Harshdev098
Now i think the issue from your side is solved pls review the code now

@Harshdev098 Harshdev098 merged commit b8cd9e7 into Harshdev098:main Oct 14, 2024
1 check passed
@Harshdev098 Harshdev098 added hacktoberfest This issue belongs to hacktoberfest gssoc-ext This issue is under GSSoc Ext program level3 labe3 label for gssoc hacktoberfest-accepted label for accepted PRs under hacktoberfest labels Oct 14, 2024
@Harshdev098
Copy link
Owner

Yah, its resolved

@ygowthamr
Copy link
Contributor Author

@Harshdev098
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc-ext This issue is under GSSoc Ext program hacktoberfest This issue belongs to hacktoberfest hacktoberfest-accepted label for accepted PRs under hacktoberfest level3 labe3 label for gssoc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: App crashes when entering an existing email ID saved in info_table
2 participants