/    Sign up×
Community /Pin to ProfileBookmark

Check existing username in database?

Hi there

Does anyone know of any javascript that would check for an entry in an Access database table, and alert the user if they are trying to re-enter the same value?

I’m afraid I’m not much of a coder and have been relying on Dreamweaver to help create a simple registration form. Dreamweaver has a function that allows it to check for an existing username and then divert you to another page to inform you of the error, but I’d rather have an alert message than a page redirect. Also the dreamweaver ‘check username’ function only applies if you are inserting a record, and does not work if you are simply updating a record (if you want to edit your personal details, for example).

If anyone can help with this, I’d really appreciate it. Thanks.

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@mjdamatoAug 05.2007 — No, not directly. JavaScript is client-side and would not have access to interact with the database. Your only options would be to implement AJAX to have the JAvascript make a call to a server-side script to return back a true/false response or to have the page load all the current usernames into a Javascript array.
×

Success!

Help @Kamraniac spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...