This topic is locked
[SOLVED]

 Passing parameters in register.php

1/17/2012 16:24:20
PHPRunner General questions
B
bluedude author

I want to let people signup through a kind of affiliate ID and for that I need to add parameters to register.php. I do this for example in Before Display:
if ($_GET["email"]!=""){

$xt->assign("email_value",$_GET["email"]);

}
However, this does not work. None of my register fields work.

C
cgphp 1/17/2012

It's not very clear what you want to do. You can choose fields for the registration page from the "User login settings" window (http://xlinesoft.com/phprunner/docs/user_login_settings.htm) or you can add custom fields to the register form (http://xlinesoft.com/phprunner/docs/add_custom_field_to_form.htm)

B
bluedude author 1/18/2012

Alright, again :-)
I want to use URL parameters in register.php, like register.php?email=test@test.com etc. These parameters are used to pre-fill information on the registration form.
I'm not talking about the login form.
I tried to do above in the Before Display event with the code:
if ($_GET["email"]!=""){

$xt->assign("email_value",$_GET["email"]);

}
Where email is a fieldname, however this does not work. Any suggestions?
Cheers,

Sergey Kornilov admin 1/18/2012

Simply set default value of email field to $_GET["email"] on registration page. This is it.