fix
This commit is contained in:
@@ -18,6 +18,7 @@ class Signup extends CI_Controller {
|
|||||||
$submit = NULL;
|
$submit = NULL;
|
||||||
|
|
||||||
extract($_POST);
|
extract($_POST);
|
||||||
|
//var_dump($_POST);
|
||||||
|
|
||||||
$data['firstname'] = $firstname;
|
$data['firstname'] = $firstname;
|
||||||
$data['lastname'] = $lastname;
|
$data['lastname'] = $lastname;
|
||||||
@@ -39,7 +40,8 @@ class Signup extends CI_Controller {
|
|||||||
$data['signup_error'] = '';
|
$data['signup_error'] = '';
|
||||||
|
|
||||||
if ($_POST) { // post
|
if ($_POST) { // post
|
||||||
if ($data['terms'] == 'on') {
|
if ($data['terms'] == 'on' || $data['terms'] == '1') {
|
||||||
|
$data['terms'] == 'on';
|
||||||
$terms_checked = 'checked';
|
$terms_checked = 'checked';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,6 +75,7 @@ class Signup extends CI_Controller {
|
|||||||
} else {
|
} else {
|
||||||
$data['signup_error'] = "Enter all required fields";
|
$data['signup_error'] = "Enter all required fields";
|
||||||
}
|
}
|
||||||
|
//exit;
|
||||||
} // if post
|
} // if post
|
||||||
$data['signup_error_style'] = '';
|
$data['signup_error_style'] = '';
|
||||||
if (strlen($data['signup_error']) > 0) {
|
if (strlen($data['signup_error']) > 0) {
|
||||||
|
|||||||
+21
-8
@@ -23,7 +23,7 @@
|
|||||||
<!--begin::Wrapper-->
|
<!--begin::Wrapper-->
|
||||||
<div class="w-lg-600px bg-body rounded shadow-sm p-10 p-lg-15 mx-auto">
|
<div class="w-lg-600px bg-body rounded shadow-sm p-10 p-lg-15 mx-auto">
|
||||||
<!--begin::Form-->
|
<!--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-->
|
<!--begin::Heading-->
|
||||||
<div class="mb-10 text-center">
|
<div class="mb-10 text-center">
|
||||||
<!--begin::Title-->
|
<!--begin::Title-->
|
||||||
@@ -51,17 +51,18 @@
|
|||||||
</div>
|
</div>
|
||||||
<!--end::Separator-->
|
<!--end::Separator-->
|
||||||
<!--begin::Input group-->
|
<!--begin::Input group-->
|
||||||
|
<?php echo $country_combo ?>
|
||||||
<div class="row fv-row mb-7">
|
<div class="row fv-row mb-7">
|
||||||
<!--begin::Col-->
|
<!--begin::Col-->
|
||||||
<div class="col-xl-6">
|
<div class="col-xl-6">
|
||||||
<label class="form-label fw-bolder text-dark fs-6">First Name</label>
|
<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>
|
</div>
|
||||||
<!--end::Col-->
|
<!--end::Col-->
|
||||||
<!--begin::Col-->
|
<!--begin::Col-->
|
||||||
<div class="col-xl-6">
|
<div class="col-xl-6">
|
||||||
<label class="form-label fw-bolder text-dark fs-6">Last Name</label>
|
<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>
|
</div>
|
||||||
<!--end::Col-->
|
<!--end::Col-->
|
||||||
</div>
|
</div>
|
||||||
@@ -69,7 +70,7 @@
|
|||||||
<!--begin::Input group-->
|
<!--begin::Input group-->
|
||||||
<div class="fv-row mb-7">
|
<div class="fv-row mb-7">
|
||||||
<label class="form-label fw-bolder text-dark fs-6">Email</label>
|
<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>
|
</div>
|
||||||
<!--end::Input group-->
|
<!--end::Input group-->
|
||||||
<!--begin::Input group-->
|
<!--begin::Input group-->
|
||||||
@@ -81,7 +82,7 @@
|
|||||||
<!--end::Label-->
|
<!--end::Label-->
|
||||||
<!--begin::Input wrapper-->
|
<!--begin::Input wrapper-->
|
||||||
<div class="position-relative mb-3">
|
<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">
|
<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-slash fs-2"></i>
|
||||||
<i class="bi bi-eye fs-2 d-none"></i>
|
<i class="bi bi-eye fs-2 d-none"></i>
|
||||||
@@ -106,26 +107,38 @@
|
|||||||
<!--begin::Input group-->
|
<!--begin::Input group-->
|
||||||
<div class="fv-row mb-5">
|
<div class="fv-row mb-5">
|
||||||
<label class="form-label fw-bolder text-dark fs-6">Confirm Password</label>
|
<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>
|
</div>
|
||||||
<!--end::Input group-->
|
<!--end::Input group-->
|
||||||
<!--begin::Input group-->
|
<!--begin::Input group-->
|
||||||
<div class="fv-row mb-10">
|
<div class="fv-row mb-10">
|
||||||
<label class="form-check form-check-custom form-check-solid form-check-inline">
|
<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
|
<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>
|
<a href="#" class="ms-1 link-primary">Terms and conditions</a>.</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<!--end::Input group-->
|
<!--end::Input group-->
|
||||||
<!--begin::Actions-->
|
<!--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">
|
<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-label">Submit</span>
|
||||||
<span class="indicator-progress">Please wait...
|
<span class="indicator-progress">Please wait...
|
||||||
<span class="spinner-border spinner-border-sm align-middle ms-2"></span></span>
|
<span class="spinner-border spinner-border-sm align-middle ms-2"></span></span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!--end::Actions-->
|
<!--end::Actions-->
|
||||||
</form>
|
</form>
|
||||||
<!--end::Form-->
|
<!--end::Form-->
|
||||||
|
|||||||
Reference in New Issue
Block a user