fix
This commit is contained in:
@@ -18,6 +18,7 @@ class Signup extends CI_Controller {
|
||||
$submit = NULL;
|
||||
|
||||
extract($_POST);
|
||||
//var_dump($_POST);
|
||||
|
||||
$data['firstname'] = $firstname;
|
||||
$data['lastname'] = $lastname;
|
||||
@@ -39,7 +40,8 @@ class Signup extends CI_Controller {
|
||||
$data['signup_error'] = '';
|
||||
|
||||
if ($_POST) { // post
|
||||
if ($data['terms'] == 'on') {
|
||||
if ($data['terms'] == 'on' || $data['terms'] == '1') {
|
||||
$data['terms'] == 'on';
|
||||
$terms_checked = 'checked';
|
||||
}
|
||||
|
||||
@@ -73,6 +75,7 @@ class Signup extends CI_Controller {
|
||||
} else {
|
||||
$data['signup_error'] = "Enter all required fields";
|
||||
}
|
||||
//exit;
|
||||
} // if post
|
||||
$data['signup_error_style'] = '';
|
||||
if (strlen($data['signup_error']) > 0) {
|
||||
|
||||
+21
-8
@@ -23,7 +23,7 @@
|
||||
<!--begin::Wrapper-->
|
||||
<div class="w-lg-600px bg-body rounded shadow-sm p-10 p-lg-15 mx-auto">
|
||||
<!--begin::Form-->
|
||||
<form class="form w-100" novalidate="novalidate" id="kt_sign_up_form" action="signup" method="POST">
|
||||
<form class="form w-100" action="signup" method="POST" id="registration">
|
||||
<!--begin::Heading-->
|
||||
<div class="mb-10 text-center">
|
||||
<!--begin::Title-->
|
||||
@@ -51,17 +51,18 @@
|
||||
</div>
|
||||
<!--end::Separator-->
|
||||
<!--begin::Input group-->
|
||||
<?php echo $country_combo ?>
|
||||
<div class="row fv-row mb-7">
|
||||
<!--begin::Col-->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label fw-bolder text-dark fs-6">First Name</label>
|
||||
<input class="form-control form-control-lg form-control-solid" type="text" placeholder="Firstname" name="firstname" value="<?php echo $firstname;?>" autocomplete="off" />
|
||||
<input class="form-control form-control-lg form-control-solid" type="text" placeholder="Firstname" name="firstname" value="<?php echo $firstname;?>" required="required" autocomplete="off" />
|
||||
</div>
|
||||
<!--end::Col-->
|
||||
<!--begin::Col-->
|
||||
<div class="col-xl-6">
|
||||
<label class="form-label fw-bolder text-dark fs-6">Last Name</label>
|
||||
<input class="form-control form-control-lg form-control-solid" type="text" placeholder="Lastname" name="lastname" value="<?php echo $lastname;?>" autocomplete="off" />
|
||||
<input class="form-control form-control-lg form-control-solid" type="text" placeholder="Lastname" name="lastname" value="<?php echo $lastname;?>" required="required" autocomplete="off" />
|
||||
</div>
|
||||
<!--end::Col-->
|
||||
</div>
|
||||
@@ -69,7 +70,7 @@
|
||||
<!--begin::Input group-->
|
||||
<div class="fv-row mb-7">
|
||||
<label class="form-label fw-bolder text-dark fs-6">Email</label>
|
||||
<input class="form-control form-control-lg form-control-solid" type="email" placeholder="Your email-Username" name="email" value="<?php echo $email;?>"autocomplete="off" />
|
||||
<input class="form-control form-control-lg form-control-solid" type="email" placeholder="Your email-Username" name="email" value="<?php echo $email;?>" required="required" autocomplete="off" />
|
||||
</div>
|
||||
<!--end::Input group-->
|
||||
<!--begin::Input group-->
|
||||
@@ -81,7 +82,7 @@
|
||||
<!--end::Label-->
|
||||
<!--begin::Input wrapper-->
|
||||
<div class="position-relative mb-3">
|
||||
<input class="form-control form-control-lg form-control-solid" type="password" placeholder="Create password" name="password" autocomplete="off" />
|
||||
<input class="form-control form-control-lg form-control-solid" type="password" placeholder="Create password" name="password" required="required" autocomplete="off" />
|
||||
<span class="btn btn-sm btn-icon position-absolute translate-middle top-50 end-0 me-n2" data-kt-password-meter-control="visibility">
|
||||
<i class="bi bi-eye-slash fs-2"></i>
|
||||
<i class="bi bi-eye fs-2 d-none"></i>
|
||||
@@ -106,26 +107,38 @@
|
||||
<!--begin::Input group-->
|
||||
<div class="fv-row mb-5">
|
||||
<label class="form-label fw-bolder text-dark fs-6">Confirm Password</label>
|
||||
<input class="form-control form-control-lg form-control-solid" type="password" placeholder="" name="confirm-password" autocomplete="off" />
|
||||
<input class="form-control form-control-lg form-control-solid" type="password" placeholder="" name="confirm-password" required="required" autocomplete="off" />
|
||||
</div>
|
||||
<!--end::Input group-->
|
||||
<!--begin::Input group-->
|
||||
<div class="fv-row mb-10">
|
||||
<label class="form-check form-check-custom form-check-solid form-check-inline">
|
||||
<input class="form-check-input" type="checkbox" name="toc" value="1" />
|
||||
<input class="form-check-input" type="checkbox" name="terms" <?=$terms?> required="required" value="on" />
|
||||
<span class="form-check-label fw-bold text-gray-700 fs-6">I Agree
|
||||
<a href="#" class="ms-1 link-primary">Terms and conditions</a>.</span>
|
||||
</label>
|
||||
</div>
|
||||
<!--end::Input group-->
|
||||
<!--begin::Actions-->
|
||||
<?php
|
||||
if (isset($signup_error_style) && $signup_error_style !=''){
|
||||
?>
|
||||
<div class="text-center">
|
||||
<? echo $signup_error_style; ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="text-center">
|
||||
<button type="button" id="kt_sign_up_submit" class="btn btn-lg btn-primary">
|
||||
<button type="button" onclick="document.getElementById('registration').submit();" class="btn btn-lg btn-primary">
|
||||
<span class="indicator-label">Submit</span>
|
||||
<span class="indicator-progress">Please wait...
|
||||
<span class="spinner-border spinner-border-sm align-middle ms-2"></span></span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<!--end::Actions-->
|
||||
</form>
|
||||
<!--end::Form-->
|
||||
|
||||
Reference in New Issue
Block a user