If you wish to use custom affiliate login form at a page of yours, then you can do so simply via the following simple HTML form:
<form action="https://URL_TO_PostAffiliatePro/affiliates/login.php" method="post">
Username <input type="text" name="username" value=""><br>
Password <input type="password" name="password" value=""><br>
Remember me <input type="checkBox" name="rememberMe" checked><br>
<input type="submit" value="Login">
</form>
If you are using multiple languages, you can add language selection list-box, but you need to add there your used languages with particular language codes:
<form action="https://URL_TO_PostAffiliatePro/affiliates/login.php" method="post">
Username <input type="text" name="username" value=""><br>
Password <input type="password" name="password" value=""><br>
Remember me <input type="checkBox" name="rememberMe" checked><br>
Language
<select type="text" name="language">
<option value="en-US">English</option>
<option value="de">German</option>
<option value="sk">Slovak</option>
</select><br>
<input type="submit" value="Login">
</form>
For merchant panel:
<form action="https://URL_TO_PostAffiliatePro/merchants/login.php" method="post">
Username <input type="text" name="username" value=""><br>
Password <input type="password" name="password" value=""><br>
Remember me <input type="checkBox" name="rememberMe" checked><br>
<input type="submit" value="Login">
</form>
For merchant panel with language selection list-box:
<form action="https://URL_TO_PostAffiliatePro/merchants/login.php" method="post">
Username <input type="text" name="username" value=""><br>
Password <input type="password" name="password" value=""><br>
Remember me <input type="checkBox" name="rememberMe" checked><br>
Language
<select type="text" name="language">
<option value="en-US">English</option>
<option value="de">German</option>
<option value="sk">Slovak</option>
</select><br>
<input type="submit" value="Login">
</form>
As this is pure simple HTML code, error response or two factor authentication code is processed in our default login form. But if you are familiar with PHP language, and you can use PHP code on your pages, you can use this advanced example with included PHP code, here is error response processed in this custom login page.
Affiliate login form with handling of submitted login credentials:
<form action="https://URL_TO_PostAffiliatePro/affiliates/login.php" method="post">
Username <input type="text" name="username" value="<?php echo (isset($_REQUEST['username']) ? $_REQUEST['username'] : ''); ?>" required="required"><br>
Password <input type="password" name="password" value="" required="required"><br>
<?php
if (isset($_POST['twofactor_required']) && $_POST['twofactor_required'] == 'enter_token' ||
isset($_POST['twofactor_token']) && $_POST['twofactor_token'] != 'enter_token') {
?>
Verification Code <input type="text" name="twofactor_token" value="" required="required"><br>
<?php
if (isset($_POST['successMessage']) && $_POST['successMessage'] != '') {
echo '<span style="color: #49BB0C;">'.$_POST['successMessage'].'</span><br>';
}
}
?>
Remember me <input type="checkBox" name="rememberMe" checked><br>
<?php
$actual_link = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
?>
<input type="hidden" name="errorUrl" value="<?php echo $actual_link;?>">
<?php
if(array_key_exists('cumulativeErrorMessage', $_POST) && $_POST['cumulativeErrorMessage'] != '') {
?>
<fieldset style="color: #ff0000;">
<legend>Error</legend>
<?php echo $_POST['cumulativeErrorMessage']?>
</fieldset>
<?php
}
?>
<input type="submit" value="Login">
</form>
Affiliate login form with language selection list-box and handling of submitted login credentials:
<form action="https://URL_TO_PostAffiliatePro/affiliates/login.php" method="post">
Username <input type="text" name="username" value="<?php echo (isset($_REQUEST['username']) ? $_REQUEST['username'] : ''); ?>" required="required"><br>
Password <input type="password" name="password" value="" required="required"><br>
<?php
if (isset($_POST['twofactor_required']) && $_POST['twofactor_required'] == 'enter_token' ||
isset($_POST['twofactor_token']) && $_POST['twofactor_token'] != 'enter_token') {
?>
Verification Code <input type="text" name="twofactor_token" value="" required="required"><br>
<?php
if (isset($_POST['successMessage']) && $_POST['successMessage'] != '') {
echo '<span style="color: #49BB0C;">'.$_POST['successMessage'].'</span><br>';
}
}
?>
Remember me <input type="checkBox" name="rememberMe" checked><br>
Language
<select type="text" name="language">
<option value="en-US" <?php echo (isset($_REQUEST['language']) && $_REQUEST['language'] == 'en-US' ? 'selected="selected"' : '');?>>English</option>
<option value="de" <?php echo (isset($_REQUEST['language']) && $_REQUEST['language'] == 'de' ? 'selected="selected"' : '');?>>German</option>
<option value="sk" <?php echo (isset($_REQUEST['language']) && $_REQUEST['language'] == 'sk' ? 'selected="selected"' : '');?>>Slovak</option>
</select><br>
<?php
$actual_link = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
?>
<input type="hidden" name="errorUrl" value="<?php echo $actual_link;?>">
<?php
if(array_key_exists('cumulativeErrorMessage', $_POST) && $_POST['cumulativeErrorMessage'] != '') {
?>
<fieldset style="color: #ff0000;">
<legend>Error</legend>
<?php echo $_POST['cumulativeErrorMessage']?>
</fieldset>
<?php
}
?>
<input type="submit" value="Login">
</form>
For merchant panel login form is difference only form action url, change it from https://URL_TO_PostAffiliatePro/affiliates/login.php to https://URL_TO_PostAffiliatePro/merchants/login.php.
If you wish to use a custom signup form check it out here: