Comment

Comment by Dinius

Something like this: (PHP felt like the right approach here :p)

        if ($selectedOption == SECURITY_QUESTION)
  	{
  		if (isset($_POST["SecurityQuestion0"]) && isset(["SecurityQuestion1"]))
  		{
    			if ($_POST["SecurityQuestion0"] != $answer0 || $_POST["SecurityQuestion1"] != $answer1)
  			{
  				// invalid answers
  				return;
  			}
  		}

  		authenticateUser();
  	}
parent Dinius 10 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton