Registration by steps

Hey there! I’m working on a kind of mini social network (don’t worry, it’s not one more facebook). So, to make it easier for the users, I divided the registration process into 3 steps (kind of user, main info, additional info). How do I do that?

Explaining it better…

The thing is, I’m working with one table only for 3 kind of users. This kind depends on a field in the table named usr_type. Kind “A” of user uses all the fields in table, while kind “B” uses, lets say, 70% of the fields, and the last kind “C” uses only a half. When a user doesnt uses all the fields in the table, I leave them as NULL. But when its the first kind of user “A” (or even “B”), for example, there’s fields that cannot be NULL, so I need to have different validation on them. Also, there will be difference when showing a view for this user, lets say, his profile, or a search, whatever…

So how is the best way to deal with it in Yii ??

I also know that I’ll need to use sessions, right? My doubt actually is about how will I manage the different kind of users inside my app. But you can give me tips on using sessions too, like, a guest cannot access the second page of registration, etc… and how do I do this in my controller. My main objective is to make this steps like tabs, using javascript, it seems there’s an extension to do that, anyway, I’ll do it using separate views first, without using ajax, to make it simplier.

Don’t know if it is the best way to do but what i would do is.

Have a page.With a <div id="register">an initial the step01</div>

inside there will be the first step.

The next -> step will be ajax link. So when clicked it would make a request to a script send the proper data and receive the proper html. Then append it to the register div as id=step2 and hide the step1

this will happen with step 3 also

what you have to do is that when user click previous is to erase the step div you already are if the data supplied to the previous step alter the one you are.