Question: Web Programming-2 Assignment-1 The validation discussed above should be implemented only using regular expressions and the preg_match function. If the equation is invalid, the error

Web Programming-2 Assignment-1 The validation discussed above should be implemented only using regular expressions and the preg_match function. If the equation is invalid, the error message "Please enter a valid equation is displayed. 22+5553 Please enter a valid equation Enter your equation: The result is: Submit Write a php page that prompts user to enter an equation. When the user hits the "submit" button, the entered equation will be validated and evaluated in the same page. If the equation is valid, then it will be evaluated and the result is displayed on the page as shown in the following figure: Enter your equation: The result is: 22+555 577 Submit JavaScript code is not allowed. the value of the input field is kept when the user hits the submit button. Please not the following: End of document The entered equation is valid if and only if: o It is written in the following sequence: a first operand, followed by an operator, and finally a second operand. o The first operand is an even number greater than or equal O. o The second operand is divisible by 5 and greater than or equal 0. o The operator could be "+", "-", "*" or"/" E.g.) the equation "3+995" is invalid, but "466+45" is valid Web Programming-2 Assignment-1 The validation discussed above should be implemented only using regular expressions and the preg_match function. If the equation is invalid, the error message "Please enter a valid equation is displayed. 22+5553 Please enter a valid equation Enter your equation: The result is: Submit Write a php page that prompts user to enter an equation. When the user hits the "submit" button, the entered equation will be validated and evaluated in the same page. If the equation is valid, then it will be evaluated and the result is displayed on the page as shown in the following figure: Enter your equation: The result is: 22+555 577 Submit JavaScript code is not allowed. the value of the input field is kept when the user hits the submit button. Please not the following: End of document The entered equation is valid if and only if: o It is written in the following sequence: a first operand, followed by an operator, and finally a second operand. o The first operand is an even number greater than or equal O. o The second operand is divisible by 5 and greater than or equal 0. o The operator could be "+", "-", "*" or"/" E.g.) the equation "3+995" is invalid, but "466+45" is valid
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
