If you want to use the WA redirect features of the login transaction, you can:
- Create a login page
- Add the security assist include file and session start to the registration page:
<?php
if (!isset($_SESSION)) {
session_start();
}
?>
<?php require_once( "WA_SecurityAssist/Helper_PHP.php" ); ?> - Make sure the registration insert transaction DOES NOT REDIRECT.
- Add the login transaction code AFTER the registration insert code.
- Change the login trigger to the same as the registration trigger:
if (((isset($_POST["MM_insert"]))?$_POST["MM_insert"]:"") == "WAATKRegistrationForm") { . . .
- Last, make sure the values posted in the registration form are the same as in the login form. For example, don't call it login on the login page and username on the registration form. If that is the case, just modify the login transaction to change "login" to "username" so it matches the registration form.