This topic is locked
[SOLVED]

 New User Registration page

5/6/2010 2:34:53 AM
PHPRunner General questions
M
mid3vil author

I need to redirect a user to input some more information after entering the initial registration page data.

On the register.php page i have a field called Account_Type (VarChar)/dropdown which is part of my Users table.
If Account_type is equal to "Driver" i want to redirect to Registration_Driver_edit.php?editid1=xxx where xxx is the newly registered user's UserId value
eg

$userdata["UserId"]
any suggestions because right now it sends me to a list page.
My reason behind this is that there will be 3 different login types, each having particular information entered thus needing customized pages.
Thanks
Mid3vil

J
Jane 5/6/2010

Hi,
I'm not sure that I fully understand you.

Do you want to create new record after registration (or login) in the Registration_Driver table? Or is it just a custom view of your table with users?

Could you clarify where do you want to redirect: after registration or after login?

M
mid3vil author 5/6/2010



Hi,
I'm not sure that I fully understand you.

Do you want to create new record after registration (or login) in the Registration_Driver table? Or is it just a custom view of your table with users?

Could you clarify where do you want to redirect: after registration or after login?


I want the record to be created after registration, then redirect to the custom view called Registration_Driver_edit.php. Its a custom view of my Users table.

J
Jane 5/11/2010

Hi,
here is a sample code for AfterSuccessfulRegistrationevent:

$rstmp = CustomQuery("select ID from UsersTableName where UserName='".$userdata["UserName"]."'");

$datatmp = db_fetch_array($rstmp);

$_SESSION["UserID"] = $userdata["UserName"];

$_SESSION["AccessLevel"] = ACCESS_LEVEL_USER;

header("Location: AnotherTableName_edit.php?editid1=".$datatmp["ID"]);

exit();