I have created a registration form, where on the first page the user enters a user name and password, then they go to the next page where they enter their name. This then goes to the next page where they enter their address, then there contact details.

But I want all these details to go on to a page where they can review their details, then press a submit button which inserts the data into a mysql db.
But I need help with how I do this?

I have created the following Java script in the body. Or should it be in the header? Or on another form? to insert their details:-

<% Insert Data %>
<jrun:sql datasrc="regift">

INSERT INTO account VALUES ('<%= request.getParameter("User_Name").trim() %>',
'<%= request.getParameter("Password").trim() %>',

INSERT INTO name VALUES ('<%= request.getParameter("First_Name").trim() %>',
'<%= request.getParameter("Last_Name").trim() %>'

INSERT INTO address VALUES ('<%= request.getParameter("House_Number").trim() %>',
'<%= request.getParameter("Street").trim() %>',
'<%= request.getParameter("Town").trim() %>',
'<%= request.getParameter("County").trim() %>',
'<%= request.getParameter("Postcode").trim() %>'

INSERT INTO contact_details VALUES ('<%= request.getParameter("Email_Address").trim() %>',
'<%= request.getParameter("Telephone_Number").trim() %>'

Is this correct?

Thanks for all your help, Lou.

11 Years
Discussion Span
Last Post by jwenting

That's not Javascript, it's JSP scriptlet code.
And that's something you should NOT use. Learn about proper web application design and put everything except display code in a servlet.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.