/    Sign up×
Community /Pin to ProfileBookmark

execute sql command using onclick

How do I execute a sql command using onclick?

How do I define the server, database, username and passwword?

The command I want to run is:

insert into orderentry (acctname) values(”)

Please let me know ASAP.

TIA for your help.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@KorJan 07.2004 — I sound confusing to me...

As far as I know, you can not execute anything using javascript, you can just aply for a server-side application using a submit action (post or get).

The 3-rd part executing command is up to the way that server-side application is build, is not a javascript manner.

So, I think that onclick() event handler can only send some values or a request to a server-side application, using methods such us document.name_of_form.submit() and document.name_of_form.action
Copy linkTweet thisAlerts:
@haastnooitJan 09.2004 — u can't do anything like that clientside and i wouldn't even post that to a different page people can find out details about your database by just looking at the query (tablenames and/or fieldnames in that table).
×

Success!

Help @tcovert 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.18,
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,
)...