Jump to content

Registration Error


ncd200

Recommended Posts

Hello

I h.ave a problem with my registration form. I am unable to register and i dont know what the problem is

When i click register the page resets itself to the register form with all errors activated.

 

My code is below so I hope someone can spot the problem.

 

   <style>
  .scroller {
    overflow: scroll;
    padding: 5px;
    height: 100%;
  }
  
  input[type=submit] {
    width: 30em;  
}
</style>
<?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?>

<script src='https://www.google.com/recaptcha/api.js'></script>

    <section id="sign-up">

        <!-- Background Bubbles -->
        <canvas id="bubble-canvas"></canvas>
        <!-- /Background Bubbles -->

        <!-- Sign Up Form -->
        <form action="<?php echo url('/registration');?>" method="post">
            <div class="row links">
                <div class="col s6 logo">
                    <img src="<?php echo SITE_URL?>/lib/skins/bluewings/assets/_con/images/logo-white.png" alt="">
                </div>
                <div class="col s6 right-align"><a href="<?php echo url('/login');?>">Sign In</a> /
                    <strong>Sign Up</strong>
                </div>
            </div>

            <div class="card-panel clearfix">
            
                <div class="form-group">
                    <!-- First Name -->
                        <div class="input-field">
                            <input id="input_fname" name="firstname" value="<?php echo Vars::POST('firstname');?>" type="text" placeholder="First Name"><?php
                          if($firstname_error == true)
                              echo '<p class="error">Please enter your first name</p>';
                      ?>
                        </div>
                    <!-- /First Name -->

                    <!-- Last Name -->
                        <div class="input-field">
                            <input id="input_lname" value="<?php echo Vars::POST('lastname');?>" type="text" placeholder="Last Name"><?php
                          if($lastname_error == true)
                              echo '<p class="error">Please enter your last name</p>';
                      ?></div>
                    </div>
                    <!-- /Last Name -->

                <!-- Email -->
                <div class="form-group">
                    <input id="input_email" type="email" name="email" value="<?php echo Vars::POST('email');?>" placeholder="Email"><?php
                          if($email_error == true)
                              echo '<p class="error">Please enter your email address</p>';
                      ?>
                </div>
                <!-- /Email -->
 
                <!-- Password -->
                <div class="form-group">
                    <input type="password" name="password1" id="password" class="form-control" placeholder="Password">
                </div>
                <!-- /Password -->
                
                <!-- Password -->
                <div class="form-group">
                    <input type="password" name="password1" class="form-control" placeholder="Password"><?php
                          if($password_error == true)
                              echo '<p class="error">'.$password_error.'</p>';
                      ?>
                    
                </div>
                <!-- /Password -->
                
                <div class="form-group">
                      <select name="code" id="code" style="width: 80%;">
		<?php
		foreach($airline_list as $airline) {
			echo '<option value="'.$airline->code.'">'.$airline->code.' - '.$airline->name.'</option>';
		}
		?>
		</select>
                      
                  </div>
                  
                  <div class="form-group">
                      <select name="location">
                          <?php
                              foreach($countries as $countryCode=>$countryName)
                              {
                              if(Vars::POST('location') == $countryCode)
                                  $sel = 'selected="selected"';
                              else
                                  $sel = '';
                                  echo '<option value="'.$countryCode.'" '.$sel.'>'.$countryName.'</option>';
                              }
                          ?>
                      </select>
                      <?php
                          if($location_error == true)
                              echo '<p class="error">Please enter your location</p>';
                      ?>
                  </div>
                  
                  <div class="form-group">
                      <select name="hub" id="hub">
                          <?php
                              foreach($allhubs as $hub)
                              {
                                  echo '<option value="'.$hub->icao.'">'.$hub->icao.' - ' . $hub->name .'</option>';
                              }
                          ?>
                      </select>
                  </div>
                  
                  <div class="form-group">
                  <?php
                      //Put this in a seperate template. Shows the Custom Fields for registration
                      Template::Show('registration_customfields.tpl');
                  ?>
                  </div>

<div class="form-group">
                    <?php if(isset($captcha_error)){echo '<p class="error">'.$captcha_error.'</p>';} ?>
            <div class="g-recaptcha" data-sitekey="<?php echo $sitekey;?>"></div>
            <script type="text/javascript" src="https://www.google.com/recaptcha/api.js?hl=<?php echo $lang;?>">
            </script>
                  </div>
                
				<input type="submit" class="waves-effect waves-light btn-large z-depth-0 z-depth-1-hover" name="submit" value="Sign Up" />
            </div>

        </form>
        <!-- /Sign Up Form -->

    </section>

 

Thanks in advance

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...