How to add style whereby PHP

That’s simple enough, once you have your value from the form.

$valid = array('1', '2'); // Fill with valid values for the form input

if(in_array($_POST['number'], $valid)) { // Validate the input

    $number = htmlspecialchars($_POST['number']);   // you would probably get away without htmlspecialchars() here, but good practice to always

}
else {  //  Invalid input
   echo "Error!" ; // handle this as you wish
}

Then in your html:-

<p><?php echo $number ?></p>
3 Likes