Hi

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() %>'
</jrun:sql>

Is this correct?

Thanks for all your help, Lou.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.