Jump to content

Strange Result validating User Supplied Data


objnoob

Recommended Posts

For some reason the line commented // executes unexectedly does exactly that

 

Any ideas why?

if ($_POST['user'] == null){
		$errors[] = 'An Interviewer ID is Required';
	}elseif ($_POST['task'] != 'receipting' || $_POST['task'] != 'dataentry'){
		$errors[] = 'Invalid Task'; // EXECUTES UNEXPECTEDLY
	}
	if (!empty($errors)){
		print_LoginForm($errors);
	}

 

	echo "</b><select name='task'>\n";
echo "<option value='receipting'>Receipting</option>\n";
echo "<option value='dataentry'>Data Entry</option>\n";
echo "</select>\n";

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.