Ciao a tutti, in pratica la cosa che vorrei fare è la seguente:
ho un form di login e uno di registrazione sul mio sito, praticamente vorrei che l'utente all'interno del form di login avesse anche modo di accedere al form di registrazione.
vorrei unire i due form all'interno della pagina di login in modo che non debbano caricare altre pagine ogni volta.. (penso che sia più comodo)

il codice di login è il seguente:
Codice PHP:
<?php echo Wo_LoadPage('welcome/welcome-header-register');?>
<div class="wrapper">
  <?php echo Wo_LoadPage('welcome/welcome-header-logo');?>
  <form class="login" id="login" method="post">
    <p class="title"><?php echo $wo['lang']['login']?></p>
    <input name="username" type="text" placeholder="<?php echo $wo['lang']['username']?>" autofocus/>
    <i class="fa fa-user"></i>
    <input name="password" type="password" placeholder="<?php echo $wo['lang']['password']?>" />
    <i class="fa fa-key"></i>
    <a href="<?php echo Wo_SeoLink('index.php?link1=forgot-password');?>"><?php echo $wo['lang']['forget_password']?></a>
    <div class="text-center">
      <hr>
      <?php if($wo['config']['facebookLogin'] != 0): ?>
      <a href="<?php echo $wo['facebookLoginUrl']?>" class="btn btn-social-icon btn-facebook">
      <i class="fa fa-facebook"></i>
      </a>
      <?php endif; ?>
      <?php if($wo['config']['googleLogin'] != 0): ?>
      <a href="<?php echo $wo['googleLoginUrl']?>" class="btn btn-social-icon btn-google">
      <i class="fa fa-google"></i>
      </a>
      <?php endif; ?>
      <?php if($wo['config']['twitterLogin'] != 0): ?>
      <a href="<?php echo $wo['twitterLoginUrl']?>" class="btn btn-social-icon btn-twitter">
      <i class="fa fa-twitter"></i>
      </a>
      <?php endif; ?>
      <?php if($wo['config']['linkedinLogin'] != 0): ?>
      <a href="<?php echo $wo['linkedInLoginUrl']?>" class="btn btn-social-icon btn-linkedin">
      <i class="fa fa-linkedin"></i>
      </a>
      <?php endif; ?>
      <?php if($wo['config']['VkontakteLogin'] != 0): ?>
      <a href="<?php echo $wo['VkontakteLoginUrl']?>" class="btn btn-social-icon btn-vk">
      <i class="fa fa-vk"></i>
      </a>
      <?php endif; ?>
      <?php if($wo['config']['instagramLogin'] != 0): ?>
      <a href="<?php echo $wo['instagramLoginUrl']?>" class="btn btn-social-icon btn-instagram">
      <i class="fa fa-instagram"></i>
      </a>
      <?php endif; ?>
    </div>
    <button type="submit">
    <i class="spinner"></i>
    <span class="state"><i class="fa fa-sign-in"></i> <?php echo $wo['lang']['login']?></span>
    </button>
  </form>
  <div class="typing-element"></div>
  <?php echo Wo_LoadPage('footer/welcome');?>
</div>
<?php echo Wo_LoadPage('welcome/welcome-users-profiles');?>
<script>
var working = false;
var $this = $('#login');
var $state = $this.find('button > .state');
var login_button_text = '<i class="fa fa-sign-in"></i> <?php echo $wo['lang']['login']?>';
$(function() {
  $('#login').ajaxForm({
    url: Wo_Ajax_Requests_File() + '?f=login',
    beforeSend: function() {
      working = true;
      $this.addClass('loading');
      $state.html('<?php echo $wo['lang']['authenticating'?>');
    },
    success: function(data) {
      if (data.status == 200 || data.status == 600) {
          $this.addClass('ok');
        $state.html('<?php echo $wo['lang']['welcome_back'?>');
        setTimeout(function () {
            window.location.href = data.location;
        }, 1000);
      } else {
        var errors = data.errors.join("<br>");
        $state.html(login_button_text);
        $this.removeClass('ok loading', function () {
            $state.html(errors);
        });
      } 
      working = false;
    }
  });
  $('#login input').on('click', function(e) {
      $state.html(login_button_text);
  });
});
</script>
<script>
  $(function(){
      $(".typing-element").typed({
        strings: ["<?php echo $wo['lang']['connect_with_people'?> <span class='typed-cursor'>|</span>", "<?php echo $wo['lang']['make_new_friends'?> <span class='typed-cursor'>|</span>", "<?php echo $wo['lang']['share_your_memories'?> <span class='typed-cursor'>|</span>", "<?php echo $wo['lang']['create_new_relationships'?> <span class='typed-cursor'>|</span>", "<?php echo $wo['lang']['discover_new_places'?> <span class='typed-cursor'>|</span>"],
        typeSpeed: 0,
        startDelay: 1000,
        backDelay: 2500,
        shuffle: false,
        cursorChar: "",
      });
  });
</script>
Mentre quello di registrazione è questo:
Codice PHP:
<?php 
echo Wo_LoadPage('welcome/welcome-header');
$fields Wo_GetWelcomeFileds();
?>
<div class="wrapper">
 <?php echo Wo_LoadPage('welcome/welcome-header-logo');?>
  <form class="login" id="register" method="post">
    <p class="title"><?php echo $wo['lang']['sign_up']?></p>
    <input name="username" type="text" placeholder="<?php echo $wo['lang']['username'];?>" autofocus/>
    <i class="fa fa-user"></i>
    <input name="email" type="text" placeholder="<?php echo $wo['lang']['email_address'];?>" />
    <i class="fa fa-envelope-o"></i>
    <?php if($wo['config']['sms_or_email'] == 'sms') {?>
    <input name="phone_num" type="text" placeholder="<?php echo $wo['lang']['phone_num_ex'];?>" />
    <i class="fa fa-phone"></i>
    <?php ?>
    <input name="password" type="password" placeholder="<?php echo $wo['lang']['password'];?>" />
    <i class="fa fa-key"></i>
    <input name="confirm_password" type="password" placeholder="<?php echo $wo['lang']['confirm_password'];?>" />
    <i class="fa fa-key"></i>
    <?php 
    
if (!empty($fields) && count($fields) > 0) {
      foreach (
$fields as $key => $wo['field']) {
        echo 
Wo_LoadPage('welcome/fields');
      }
    }
    
?>
    <select name="gender" id="gender" class="form-control">
      <option value="male"><?php echo $wo['lang']['male'];?></option>
      <option value="female"><?php echo $wo['lang']['female'];?></option>
    </select>
   
    <?php if($wo['config']['reCaptcha'] == 1) {?>
    <div class="form-group" style="margin-top:10px;">
      <div class="g-recaptcha" data-sitekey="<?php echo $wo['config']['reCaptchaKey']?>"></div>
    </div>
    <?php ?>
    <?php if(!empty( $_GET['last_url'])){?>
    <div class="form-group">
      <input type="hidden" name="last_url" value="<?php echo urldecode($_GET['last_url']);?>">
    </div>
    <?php ?>
    <p class="terms"><?php echo $wo['lang']['terms_agreement'?> <Br><a href="<?php echo Wo_SeoLink('index.php?link1=terms&type=terms');?>"><?php echo $wo['lang']['terms_of_use'?></a></p>
    <button>
    <i class="spinner"></i>
    <span class="state"><i class="fa fa-sign-in"></i> <?php echo $wo['lang']['lets_go'];?></span>
    </button>
  </form>
  <?php echo Wo_LoadPage('footer/welcome');?>
</div>
<?php echo Wo_LoadPage('welcome/welcome-users-profiles');?>
<script>
var working = false;
var $this = $('#register');
var $state = $this.find('button > .state');
var register_button_text = "<i class='fa fa-sign-in'></i> <?php echo $wo['lang']['lets_go']?>";
$(function() {
  $this.ajaxForm({
    url: Wo_Ajax_Requests_File() + '?f=register',
    beforeSend: function() {
      working = true;
      $this.addClass('loading');
      $state.html('<?php echo $wo['lang']['please_wait'?>');
    },
    success: function(data) {
      if (data.status == 200) {
        $this.addClass('ok');
        $state.html('<?php echo $wo['lang']['welcome_'?>');
        setTimeout(function () {
         window.location.href = data.location;
        }, 1000);
      } else if (data.status == 300) {
        window.location.href = data.location;
      } else {
        $state.html(register_button_text);
        $this.removeClass('ok loading', function () {
         $state.html(data.errors);
        });
      } 
      working = false;
    }
  });
  $('#register input').on('click', function(e) {
   $state.html(register_button_text);
  });
});
</script>
riuscite a aiutarmi a unire le due funzioni come ho spiegato??
Grazie