Basic idea: The simplest design, uses 2 iframes within a page to resolve registration, login, and change the password synchronization. PHPBB account system and original system are completely independent, so there is no need to modify
Automatically cancel the forum account before login
Registration:
Register.php Original System Registration Program Original System Registration Submit button parent.location = '***. PHP' script>";
PROFILE.PHP? MODE = register & agreed = true in PHPBB2, it will affect the execution of the Submit () function. Need to modify the template file template / profile_add_body.tpl Change the original name = Submit to Name = Submit2, because the value of the Submit button is not submitted because the Submit () function is executed, so add a hidden name = Submit1, Convenient background judgment include all $ http_post_vars ['Submit'] for $ http_post_vars ['Submit1'] in Name = Submit1, the system will be registered after the hidden value of Name = Submit1.
Login
Login.php
Function checklogin (form) {if (! checkusername (form)) return; if (! checkpass (form)) return; parent.bbslogin.document.forms [0] .username.value = form.username.value; Parent.bbslogin .Document.forms [0] .password.value = form.password.value; parent.bbslogin.document.forms [0] .submit (); document.form.submit (); // un-comment to subsmit form}
After submitting the login.php to the verification, jump out of the iframe to the top window echo "