Page 1 of 1

please I need the right codes for the green comments in the code below. It's in .php, js, html, css Thank you The web

Posted: Sat May 14, 2022 7:16 pm
by answerhappygod
Please I Need The Right Codes For The Green Comments In The Code Below It S In Php Js Html Css Thank You The Web 1
Please I Need The Right Codes For The Green Comments In The Code Below It S In Php Js Html Css Thank You The Web 1 (6.99 KiB) Viewed 45 times
please I need the right codes for the green comments in the code below. It's in .php, js, html, css Thank you

The web page should look like this picture below

NJCU Online Calculator Operator Selection =

1 2 3 4 5 6 7 8 9 10 11 12 13 <html> <head> <title>Final</title> <?php $v1=null; $operator='Operator Selection'; $v2=null; $result=null; if (!isset($_POST['v1'])&&!isset($_POST['operator'])&&!isset($_POST['V2'])){ } else { if (1/*Write a boolean expression to replace the "1", which indicates if the user typed value1 and value2 are all numbers and operator is selected(10pts)*//*Staring Point*//*Er /*Assign the information collected from the form to $v1, $operator and $v2 correspondingly(10pts)*/ /*Staring Point*/ /*Ending Point*/ /*Write a switch-case section in order calculate the $result with $v1, $operator and $v2(10pts)*/ /*Staring Point*/ /*Ending Point*/ } else { /*Write a statement to output a JS alert window with the content of "Please enter two valid numbers and select an operator!"(10pts)*/ /*Staring Point*/ /*Ending Point*/ 14 15 16 17 18 19 20 21 22 23 24 25 }

26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 ?> </head> <body> <div class="container"> <!--Add a header element with the content of green color "NJCU Online Calculator" (10pts)--> <!--Staring Point--> <!--Ending Point--> <!--Add a opening tag of form element using "post" method and subbmitting the information of the form to cuttent php file(10pts) --> <!--Staring Point --> <!--Ending Point--> <input type="text" id="v1" name="v1" value="<?php echo $v1;?>"> <select id="operator" name="operator"> <!--Add an attribute for the option element in order to make itself as the default option element of the select element(10pts)--> <!--Staring Point--><option id="default" name="default"><!--Ending Point--> <!--Add the content of the option element in order to display the value of $operator using php(10pts) --> <!--Staring Point--> <!-- Ending Point--> </option> <!--Add the option elements in order to display +, -, *, 1, % operators (10pts)--> <!--Staring Point--> <!--Ending Point--> </select> <input type="text" id="v2" name="v2" value="<?php echo $v2;?>"> <input type="submit" value="="> <!--Add an html element in order to display the $result using php(10pts)--> <!--Staring Point--> <!--Ending Point--> </form> </div> <script> if (window.history.replaceState) { window.history.replaceState( null, null, window.location.href); } </script> </body> </html> 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61