Avatar of wesleybowden21
wesleybowden21

asked on 

displayng data from a database in a textbox.

i am doing a 3 tier online banking system and am using mysql servlets jsp and html. when a user logs on i need to display their balance in a textbox. but i dont know the code to display the balance, also where should it go, in the servlet or in the jsp.
any reply would be great
Adobe Dreamweaver

Avatar of undefined
Last Comment
jpete033
ASKER CERTIFIED SOLUTION
Avatar of Esopo
Esopo
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of jpete033
jpete033

Wesley,

While I am not sure of the syntax you will use in your scenario as I work with coldfusion, here is how you can display your database data once you know the string to output your data:

This is a normal text field in a form, with an initial value of "test":

<input name="email" type="text" id="email" value="test" size="40">

You could do:

1.   Set a variable equal to the balance of the user.

2.   <input name="email" type="text" id="email" value="*CODE TO OUTPUT VARIABLE HERE*" size="40">

Sorry I don't have specifics for your situation, but this may help some.

Cheers,

Jason
Adobe Dreamweaver
Adobe Dreamweaver

Adobe Dreamweaver is a web development tool featuring both WYSIWYG and code editors that allow the user to quickly and easily build websites in a wide variety of languages, including ASP, ASP.NET, ColdFusion and PHP. It also offers support for CSS and JavaScript.

11K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo