Log in

View Full Version : Using AJAX to determine the options during registration


PennylessZ28
12-02-2005, 12:19 AM
I am trying to find a way using AJAX to allow users to register for usergroup A or usergroup B which would then display different profile fields and options based on the first selection.

Basically, when a user goes to register, they click the agree button and then select one of two

Register A or Register B

Then they are taken to the next registration page with corsponding fields.

AN-net
12-02-2005, 01:04 AM
well if its just a simple radio button choice there is no reason for ajax, just use dynamic html saying if a user chooses this add these fields. also if your just going to have them load another page upon selection then no need for any javascript just PHP:)

PennylessZ28
12-02-2005, 01:20 AM
well if its just a simple radio button choice there is no reason for ajax, just use dynamic html saying if a user chooses this add these fields. also if your just going to have them load another page upon selection then no need for any javascript just PHP:)

I could add php like this for those radio buttons?

if ($_REQUEST['do'] == 'option1')
{
DISPLAY THIS

}

if ($_REQUEST['do'] == 'option2')
{
DISPLAY THAT

}

Or would I want to use conditionals?