The following codes all passed my debugging. Run authpage.php.
/*
* Filename: authpage.php
*/
srand((double)microtime()*1000000);
//Verify whether the user input is consistent with The verification code is consistent
if(isset($_POST['uthinput']))
{
if(strcmp($_POST['authnum'],$_POST['authnum'])==0)
echo "Verification successful!";
else
echo "Verification failed!";
}
//Generate a new four-digit integer verification code
while(($authnum= rand()%10000)<1000);
?>