Click here to Skip to main content
15,884,836 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have four web forms and every form has different types of fields like

Form1 name,age, location,

Form2 about you , city, state

Form3 note1 ,note2 …ect

Form4 has a submit button ,and cancel button

And user inserts the fields into the database and he skips form3 and then he goes to the form4 and click
There is no request..redirect (); method .
How I can submit all data into the database
It is something like marriage.com, monster.com profile page
How it is possible please reply ……regards.


[edit]Transfered from "answer" to question - OriginalGriff[/edit]

Is there any way to do this job. i can not change the form design .i am sending one link you can see it is something like http://www.jeevansathi.com/profile/registration_pg1.php?source=hp_side there are so many forms so how we can do it
Posted
Updated 22-Jan-12 8:56am
v2

When he moves to the next page, read the values and store them in the Session.
At the end of the pages, read the values back form the Session, and store them.
 
Share this answer
 
Comments
faizyab 2009 22-Jan-12 14:08pm    
Dear i can use session but if there are millions of the users use this application so the server can get down . that's why i can not use session ...faiz
OriginalGriff 22-Jan-12 14:58pm    
Do they log in?
If so, then you could store progress so far in the DB and retrieve it when they next log in.
If they don't, then it's Session or Cookies as your only options.
Sergey Alexandrovich Kryukov 22-Jan-12 15:02pm    
Exactly.
--SA
OriginalGriff 22-Jan-12 15:12pm    
Yep!

Congratulations by the way on your first MVP! (sorry I'm late, but I haven't had a chance since they came out)
Espen Harlinn 22-Jan-12 14:42pm    
It's a good reply, my 5 :)
I think that your problem is merely the indication that you actually need one single form instead of Form1 to Form4. Just think about it: you require in single HTTP request to post all data from all four forms. By the way, the whole request is nothing more but a text string with parameter name/value pairs written inside of it. But this is exactly what one single HTML form does.

So, you simply need to re-design your page and enclose all four or more parts in one form.

However, you still can make your four parts distinct visually. To make an impression of going from Form3 to Form4, etc., you can make four or more parts in, say, several <div> elements and control their visibility to show them one at a time with some navigation control (forward/back, next/previous). As with this approach you need to do it purely in a client part, I would use jQuery, please see:
http://en.wikipedia.org/wiki/JQuery[^],
http://jquery.com/[^].

With jQuery, such things are really easy to implement and maintain; it also looks very compact.

If you still want four separate forms, you should deal with the fact they send separate HTTP request anyway, no matter what you do. This is the opposite variant which you can consider. You should integrate them together on logical level. This is more difficult as you need to maintain the session on each step. Technically, all posts are independent, you need to identify that they come from the same user and put them together, take into account skipped forms, data which was post on other steps, etc. The user can make a mistake and be able to go back if the current part passed your validation or not. This approach is very usual.

—SA
 
Share this answer
 
Comments
faizyab 2009 22-Jan-12 14:20pm    
Friend

Is there any way to do this job. i can not change the form design .i am sending one link you can see
it is something like
http://www.jeevansathi.com/profile/registration_pg1.php?source=hp_side
there are so many forms so how we can do it
Sergey Alexandrovich Kryukov 22-Jan-12 14:59pm    
What you say is: "I don't want to change anything, but I want it changed so it should work in a different way". Did anyone tell you that there is no such thing as miracle? :-)

However, after a look at the reference page, I can see you that this is very straightforward. You just need to understand the the "form" element should be only one: it opens before the "Account detail" and closes below "Create My Profile". That's it!

What I described about navigation and part visibility is just extra. If your form should look as the page you've referenced, it's too simple. Just do it.

Is it clear now? If finally it is, consider accepting my answer formally (green button) -- thanks.
--SA
Sergey Alexandrovich Kryukov 22-Jan-12 15:04pm    
And please, why would you post your follow-up question as a "solution"? It is not. Even more weird is that you accepted you own post as an answer. Why would you do it?

Please, next time add comments, reply to existing comments or use "Improve question" (above).
--SA
Espen Harlinn 22-Jan-12 14:44pm    
This is a good, solid approach - My 5!
Sergey Alexandrovich Kryukov 22-Jan-12 15:00pm    
Thank you, Espen. OP just did not get it just yet, but the problem is simple.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900