I am not sure if this is where I should put my request thread, so please move it if this is in wrong thread.
Okey, I am trying to do a "Term of use" before being able to create an account.
And I am having problem to make sure that the "box" is checked.
Here is the following code
and yea
the most importent part is missing there, but I am not really a pro in Php 
Almost forgot, this is the input form for this function:
Shall rep u if u are able to help me ofc
(common sense)
EDIT:
okey, I found one way to fix this but, my page goes all white (an error in my code?) -- Btw I am using Modern Acc v0.2
I also wonder if this is correct (I think only stain or/and Paxton can answer this?
)
Okey, I am trying to do a "Term of use" before being able to create an account.
And I am having problem to make sure that the "box" is checked.
Here is the following code
PHP:
function _checkRules($rules) {
if {XXXXXXXXXX } {
return true;
}
else {
$this->form_validation->set_message('_checkRules', 'You haven\'t accepted the rules!'
}
}


Almost forgot, this is the input form for this function:
Code:
<INPUT TYPE="checkbox" NAME="rules" id="rules" value="true" />

EDIT:
okey, I found one way to fix this but, my page goes all white (an error in my code?) -- Btw I am using Modern Acc v0.2
PHP:
function _checkRules($rules) {
if (isset($_POST['rules'])) {
return true;
}
else {
$this->form_validation->set_message('_checkRules', 'You haven\'t accepted the rules!'
}
}

PHP:
$this->form_validation->set_rules('rules', 'Rules', 'required|callback__checkRules');
Last edited: