Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
JSPballerzz webforumsuser@macromedia.com #1
Storing session variables into a Database JSP
I have a form page that users fillout for a online ad
Once completed, they hit "Preview Ad" to view the information that they just entered on the next page in simple text format (no forms on this page)
Then they hit submit on the third page to insert the previewed data into a database (but that's my problem)
Here is my question, do I set session variables to store the form data form the first page so that once they view it on the second page and hit submit, I can insert all that form data from the first page into a database? And if this is how to do it, how do set the JSP code to insert a session variable into a database?
I appreciate any help on this.
JSPballerzz webforumsuser@macromedia.com Guest
-
Database Storing
I have created and asp form and connected to a sql database on dw. What is the next step for getting the submit button to store the form info in the... -
Storing Variables in html???
I would like build an html page structure and have a Flash navigation. So for reasons of easier updating and building, I would like to have only... -
Storing variables in text files?
Hi I'm trying to export variables to a text file, so that the user's settings can be reloaded when restarting the program. Is this possible? -
Storing .doc and .pdf in database
Is anyone know how I can store Word Docs and PDF's in database, and how I can make link for visitor to download these files -
storing variables using system
>> On 30 Jun 2003 07:31:04 -0700, ^^^^ What is "this"? The question has a number of answers, depending on what you actually mean. Give a... -
bigdog205 webforumsuser@macromedia.com #2
Re: Storing session variables into a Database JSP
sounds like the chapter 22 tutorial of the book "dreamweaver the missing manual" i think thats the name. it's on line. sorry i can't be more help
bigdog205 webforumsuser@macromedia.com Guest
-
dhtmlkitchen webforumsuser@macromedia.com #3
Re: Storing session variables into a Database JSP
Use a bean.
When the user fills out stuff on first page, put that stuff in a bean. Don't allow the second page until the user bean has the requisite data.
public class User {
private String _name;
private int _age;
private char sex;
public User(String name, int age, char sex) throws IllegalArgumentException {
_name = name;
_age = age; // check this value out
_sex = sex; // allow only 'm' , 'f', and 't'
}
public void setName(String name) {
_name = name;
}
}
Make a table in the DB. Check the bean out -- programmatically validate to make sure age is a whole number less than 110, fields aren't blank, et c.
Make a java class with a static method to connect to the DB and put each field into the DB.
DBQ.createOrModifyUser(User user);
[url]http://dhtmlkitchen.com/[/url]
dhtmlkitchen webforumsuser@macromedia.com Guest



Reply With Quote

