Page 1 of 1

I know I did sopmething wrong

Posted: Fri Nov 24, 2006 6:02 pm
by me!
Ok this does not work... so what is the correct way to do it?

Code: Select all

// password checking
	if(trim("$password_a1") != ("$password_b1")) {
		$error_msg.="Your passwords do not match please re-enter them<br>";
		$error_9 = 'class="error"';
	} else {
		if (trim("$password_a1") < 4) {
		$error_msg.="Your password must be at least four letters<br>";
		$error_9 = 'class="error"';
	} else {
			if (trim("$password_a1") == ("$call_1")) {
			$error_msg.="Your passwords may NOT be your call sign!<br>";
			$error_9 = 'class="error"';
			}

Posted: Fri Nov 24, 2006 6:39 pm
by John Cartwright
define: "does not work"

and for starters, your missing a curly bracket at the end.. intending helps properly

Posted: Fri Nov 24, 2006 7:05 pm
by me!
I di dit with this, and it seams to work

Code: Select all

if( trim("$password_a1") != ("$password_b1")) {
		$error_msg.="Your passwords do not match please re-enter them<br>";
		$error_9 = 'class="error"';
	} 
	elseif (trim("$password_a1") > 4) {
		$error_msg.="Your password must be at least four letters<br>";
		$error_9 = 'class="error"';
	} 
	elseif (trim("$password_a1") == ("$call_1")) {
			$error_msg.="Your passwords may NOT be your call sign!<br>";
			$error_9 = 'class="error"';
			}

Posted: Fri Nov 24, 2006 7:20 pm
by nickvd
Perhaps telling us what it's supposed to do would assist us in telling you why it's not doing it.

Without knowing what it's doing, we have no idea why/how/when/where... Get it?

Patient: Doctor, I'm broken, why?

Doctor: um... Why don't you tell me what is wrong, not that there IS something wrong...