SiteExperts.com Logo Home | Community | Developer's Paradise
User Groups | Site Tools | Site Information | Search
 Main Menu
 Forums
SiteExperts.com Forums
All Discussions

SiteExperts Feedback
The Lounge
Dynamic HTML
Site Design/ Critiques
HTML and CSS
XML Technologies
The Wireless Internet
Internet Explorer
Microsoft .NET
The Server
Technical Support

Sponsored Links

User Groups : Forums : SiteExperts : Dynamic HTML :

Previous DiscussionNext Discussion
 how to pass value to oracle query from HTML Page

Hi Dear Members

I have developed a portal using HTML scripting. in one of the pages I need to connect to database to get the user info

Idea is to pass the user value through HTML test box

For eg: enter user name ( I will enter username in HTML text box) then this value should be substituted in sql query which is

select * from emp where username=' user name'; (this user name It should take from the HTML page.

any help in this regard would be much appreciated

thanks

 

Started By krajamk on Jul 25, 2008 at 1:37:10 PM

7 Response(s) | Reply

Earlier Replies | Replies 7 to 7 of 7 | Later Replies
Goto Page: 1
MHenke on Jul 30, 2008 at 1:04:06 AM (# 7)
This message has been edited.

To be honest, the answer sort of depends on your server side processing technology/language.
In general, given that your "HTML text box" is an input element of an HTML form that gets submitted to the server, you'll access the value as a request parameter via the API of the application server.
E.g. with JSP/Servlets (and e.g. Tomcat as server), you'll use something like


String username = request.getParameter("user_name");

(if "user_name" is the name of your HTLM input element) within a servlet that is the target of your HTML form submit.
Than you could construct a SQL statment with that variable and fire it against your Oracle server.
Of course after you've sanitized all the request parameters WRT SQL-injections and suchlike. ;)
Earlier Replies | Replies 7 to 7 of 7 | Later Replies
Goto Page: 1

To respond to a discussion, you must first logon.

If you are not registered, please register yourself to become a member of the SiteExperts.community.

User Name
Password
Copyright 1997-2004 InsideDHTML.com, LLC. All rights reserved.