• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Need support with check box function!

tosse12

Panchira Project Member
Joined
Jun 10, 2007
Messages
864
Reaction score
9
Location
Sweden
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
PHP:
		function _checkRules($rules) {
			if {XXXXXXXXXX } {
				return true;
			}
			else {
				$this->form_validation->set_message('_checkRules', 'You haven\'t accepted the rules!'
			}
		}
and yea :p the most importent part is missing there, but I am not really a pro in Php :p

Almost forgot, this is the input form for this function:
Code:
<INPUT TYPE="checkbox" NAME="rules" id="rules" value="true" />
Shall rep u if u are able to help me ofc :p (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
PHP:
		function _checkRules($rules) {
			if (isset($_POST['rules'])) {
				return true;
			}
			else {
				$this->form_validation->set_message('_checkRules', 'You haven\'t accepted the rules!'
			}
		}
I also wonder if this is correct (I think only stain or/and Paxton can answer this? :D)
PHP:
				$this->form_validation->set_rules('rules', 'Rules', 'required|callback__checkRules');
 
Last edited:
Back
Top