Also make sure you trim() the input variables before your comparison... 2cents...
/dkm ----- Original Message ----- From: "Kevin Stone" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, May 23, 2002 4:30 PM Subject: Re: [PHP] matching two form fields function? > Tis a tad easier than that. > > function match_str($str1, $str2) > { > if ($str1 == $str2) > return true; > else > return false; > } > > // If the fields don't match exit with error. > if (!match_str($field1, $field2)) > { > echo "The fields must match."; > exit; > } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php