Question

In: Computer Science

Please create a PHP action codes for the HTML CODE provided below. <!DOCTYPE html> <html> <head>...

Please create a PHP action codes for the HTML CODE provided below.

<!DOCTYPE html>

<html>

<head>

<title>

Project for keeping all your input

</title>

</head>

<body>

<h1>Welcome to this Web Based Test!!!</h1>

<p>Please answer the following questions:</p>

<hr/>

<form action="" method="post">

Name: <input type="text" name="name" value=""> <font color=red>*</font><br/><br/>

E-mail: <input type="text" name="email" value=""> <font color=red>*</font><br>

<hr/>

Choose your major area of study: <select name="major">

<option value="Digital Media" >Digital Media</option>

<option value="Software" >Software</option>

<option value="Security" >Security</option>

<option value="Business" >Business</option>

<option value="Other" >Other</option>

</select> <br/>

<hr/>

<p>Questons 1 (25points)</p>

<p>If my name is Will Smith, what is my first name?</p>

<input type="radio" value="A" name="Q1" >A. Will <br/>

<input type="radio" value="B" name="Q1" >B. Smith<br/>

<input type="radio" value="C" name="Q1" >C. Will Smith<br/>

<input type="radio" value="D" name="Q1" >D. Smith Will<br/>

<hr/>

<p>Questons 2 (25points)</p>

<p>If my favoriate color is red, what color I like most?</p>

<input type="radio" value="A" name="Q2" >A. blue<br/>

<input type="radio" value="B" name="Q2" >B. pink<br/>

<input type="radio" value="C" name="Q2" >C. red <br/>

<input type="radio" value="D" name="Q2" >D. black<br/>

<hr/>

<p>Questons 3 (25points)</p>

<p>If I was born and grew up in New York, what is my hometown's name?</p>

<input type="radio" value="A" name="Q3" >A. LA<br/>

<input type="radio" value="B" name="Q3" >B. Las Vegas<br/>

<input type="radio" value="C" name="Q3" >C. Detroit<br/>

<input type="radio" value="D" name="Q3" >D. New York <br/>

<hr/>

<p>Questons 4 (25points)</p>

<p>If my birthday is 10/27/1998, what is 10+27?</p>

<input type="radio" value="A" name="Q4" >A. 27<br/>

<input type="radio" value="B" name="Q4" >B. 37 <br/>

<input type="radio" value="C" name="Q4" >C. 17<br/>

<input type="radio" value="D" name="Q4" >D. 47<br/>

<hr/>

<input type="checkbox" name="showanswer" value="YES" > Show correct answers after submission.

<br/><br/>

<input type="submit" value="Submit this test" name="submit">

<input type="submit" name="reset" value="Reset">

</form>

<!--for admin -->

<hr/>

<div style="text-align:left;background-color:pink;width:50%;margin:auto;">

<form action="action-project-1.2.php" method="post">

<div style="text-align:right;margin-right: 20%;">

Admistrator ID: <input type="text" name="name"> <font color=red>*</font><br>

Password: <input type="password" name="passwd"> <font color=red>*</font><br>

</div>

<hr/>

<div style="text-align:left;margin-left: 20%;">

<input type="radio" name="showwhat" value="all">Show all grades<br/>

<input type="radio" name="showwhat" value="sorted">Show all grades sorted descendly <br/>

<input type="radio" name="showwhat" value="p100">Show all grades that are 100<br/>

<input type="radio" name="showwhat" value="dm0">Show all grades that are 0 and are of Digital Media Major <br/>

<input type="radio" name="showwhat" value="byname">Find student(s)'s grade by name: <input type="text" name="student" value=""><br/>

</div>

<hr/>

<div style="text-align:center;">

<input type="submit" value="See grades" name="submitme"><input type="reset">

</div>

</form>

</div>

<hr/>

</body>

</html>

Solutions

Expert Solution

hey here i am done ! here is the code ---

Please give me a like for appreciate my work --

<!DOCTYPE html>

<html>

<head>

<title>

Project for keeping all your input

</title>

</head>

<body>

<h1>Welcome to this Web Based Test!!!</h1>

<p>Please answer the following questions:</p>

<hr/>

<form action="MainHtml.php" method="post">

Name: <input type="text" name="name" value=""> <font color=red>*</font><br/><br/>

E-mail: <input type="text" name="email" value=""> <font color=red>*</font><br>

<hr/>

Choose your major area of study: <select name="major">

<option value="Digital Media" >Digital Media</option>

<option value="Software" >Software</option>

<option value="Security" >Security</option>

<option value="Business" >Business</option>

<option value="Other" >Other</option>

</select> <br/>

<hr/>

<p>Questons 1 (25points)</p>

<p>If my name is Will Smith, what is my first name?</p>

<input type="radio" value="A" name="Q1" >A. Will <br/>

<input type="radio" value="B" name="Q1" >B. Smith<br/>

<input type="radio" value="C" name="Q1" >C. Will Smith<br/>

<input type="radio" value="D" name="Q1" >D. Smith Will<br/>

<hr/>

<p>Questons 2 (25points)</p>

<p>If my favoriate color is red, what color I like most?</p>

<input type="radio" value="A" name="Q2" >A. blue<br/>

<input type="radio" value="B" name="Q2" >B. pink<br/>

<input type="radio" value="C" name="Q2" >C. red <br/>

<input type="radio" value="D" name="Q2" >D. black<br/>

<hr/>

<p>Questons 3 (25points)</p>

<p>If I was born and grew up in New York, what is my hometown's name?</p>

<input type="radio" value="A" name="Q3" >A. LA<br/>

<input type="radio" value="B" name="Q3" >B. Las Vegas<br/>

<input type="radio" value="C" name="Q3" >C. Detroit<br/>

<input type="radio" value="D" name="Q3" >D. New York <br/>

<hr/>

<p>Questons 4 (25points)</p>

<p>If my birthday is 10/27/1998, what is 10+27?</p>

<input type="radio" value="A" name="Q4" >A. 27<br/>

<input type="radio" value="B" name="Q4" >B. 37 <br/>

<input type="radio" value="C" name="Q4" >C. 17<br/>

<input type="radio" value="D" name="Q4" >D. 47<br/>

<hr/>

<input type="checkbox" name="showanswer" value="YES" > Show correct answers after submission.

<br/><br/>

<input type="submit" value="Submit this test" name="submit">

<input type="submit" name="reset" value="Reset">

</form>

<!--for admin -->

<hr/>

<div style="text-align:left;background-color:pink;width:50%;margin:auto;">

<form action="action-project-1.2.php" method="post">

<div style="text-align:right;margin-right: 20%;">

Admistrator ID: <input type="text" name="name"> <font color=red>*</font><br>

Password: <input type="password" name="passwd"> <font color=red>*</font><br>

</div>

<hr/>

<div style="text-align:left;margin-left: 20%;">

<input type="radio" name="showwhat" value="all">Show all grades<br/>

<input type="radio" name="showwhat" value="sorted">Show all grades sorted descendly <br/>

<input type="radio" name="showwhat" value="p100">Show all grades that are 100<br/>

<input type="radio" name="showwhat" value="dm0">Show all grades that are 0 and are of Digital Media Major <br/>

<input type="radio" name="showwhat" value="byname">Find student(s)'s grade by name: <input type="text" name="student" value=""><br/>

</div>

<hr/>

<div style="text-align:center;">

<input type="submit" value="See grades" name="submitme"><input type="reset">

</div>

</form>

</div>

<hr/>

</body>

</html>

and MainHtml.php

<html>
<body>

First Name : <?php echo $_POST["name"]; ?><br>
Your Email: <?php echo $_POST["email"]; ?><br>
<?php
if(isset($_POST['submit'])){
$selected_val = $_POST['major']; // Storing Selected Value In Variable
echo "You have selected :" .$selected_val; // Displaying Selected Value
}
?><br>
<?php
if(isset($_POST['Q1']))
{
echo "You have selected :".$_POST['Q1']; // Displaying Selected Value
}
?><br>
<?php
if(isset($_POST['Q2']))
{
echo "You have selected :".$_POST['Q2']; // Displaying Selected Value
}
?><br>
<?php
if(isset($_POST['Q3']))
{
echo "You have selected :".$_POST['Q3']; // Displaying Selected Value
}
?><br>
<?php
if(isset($_POST['Q4']))
{
echo "You have selected :".$_POST['Q4']; // Displaying Selected Value
}
?><br>

</body>
</html>

and action-project-1.2.php ---

<html>
<body>

First Name : <?php echo $_POST["name"]; ?><br>


Your Password: <?php echo $_POST['passwd']; ?><br>
Show all Grades : <?php
if(isset($_POST['showwhat']))
{
  
echo "You have selected :".$_POST['showwhat']; // Displaying Selected Value
}
?>

</body>
</html>

and here is the snapshot of the output ---

hey you can edit with your code .. what you want to do.. i am done from my side ..

please give me a like for my work and effort . Thank You !


Related Solutions

<!DOCTYPE html> <html> <head> <!-- *************************************************************************************** --> <!-- * * --> <!-- * Do not change...
<!DOCTYPE html> <html> <head> <!-- *************************************************************************************** --> <!-- * * --> <!-- * Do not change anything within the <head></head> section of the HTML * --> <!-- * * --> <!-- *************************************************************************************** --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"></script> <style> .btn{border:1px solid black; padding:5px;display:inline-block} </style> </head> <body> <!-- *************************************************************************************** --> <!-- * * --> <!-- * Nothing to change here in the <body> * --> <!-- * * --> <!-- ***************************************************************************************...
Draw the DOM tree for the HTML of the ImageSwap application. <!DOCTYPE html> <html> <head> <title>Image...
Draw the DOM tree for the HTML of the ImageSwap application. <!DOCTYPE html> <html> <head> <title>Image Swap Application</title> <link rel="stylesheet" type="text/css" href="image_swap.css"> <script type="text/javascript" src="image_swap.js"></script> </head> <body>     <main>         <h1>Fishing Images</h1>         <p>Click on an image to enlarge.</p>         <ul id="imageLinks">             <li><a href="images/release.jpg" title="Catch and Release">                 <img src="thumbnails/release.jpg" alt=""></a></li>             <li><a href="images/deer.jpg" title="Deer at Play">                 <img src="thumbnails/deer.jpg" alt=""></a></li>             <li><a href="images/hero.jpg" title="The Big One!">                 <img src="thumbnails/hero.jpg" alt=""></a></li>             <li><a href="images/bison.jpg" title="Grazing Bison">                 <img src="thumbnails/bison.jpg"...
Remove inline style to an external file <!DOCTYPE html> <html> <head> <title>PROBLEM</title> </head> <body>    <form>...
Remove inline style to an external file <!DOCTYPE html> <html> <head> <title>PROBLEM</title> </head> <body>    <form> <table style="color:white;background-color:blue;border:solid black 7px;border-radius:25px;"> <tr><th colspan="2" style="color:white;background-color:black;border:solid black 2px;outline:solid black 2px;">SQUARE PROBLEM</th></tr> <tr> <td><label>Enter side:</label></td><td> <input type="text" style="background-color:#DEDEE6;border:4px solid red;"/> </td> </tr> <tr> <td><label>Area:</label></td><td> <input type="text" readonly style="background-color:#DEDEE6;border:4px solid yellow;"/> </td> </tr> <tr> <td><label>Perimeter:</label></td>   <td> <input type="text" readonly style="background-color:#DEDEE6;border:4px solid yellow;"/> </td> </tr> <tr>    <td colspan="2" >    <center>    <input type="button" value="Area" style="color:white;background-color:black;border:1px solid red;"/>    <input type="button" value="Perimeter" style="color:white;background-color:black;border:1px solid white;"/>...
- Create an html form (bank form) and the PHP code with 2 accounts with options...
- Create an html form (bank form) and the PHP code with 2 accounts with options to transfer, deposit or withdraw money.
<!DOCTYPE html> <html> <body> <!-- replace the text below with your name!--> <!-- --> <!-- -->...
<!DOCTYPE html> <html> <body> <!-- replace the text below with your name!--> <!-- --> <!-- --> <title> TYPE YOUR NAME HERE</title> <script> // // A bug collector collects bugs every day for five days. Write a function that keeps // a running total of the number of bugs collected during the five days. The loop // should ask for the number of bugs collected for each day, and when the loop is // finished, the program should display the total...
<!DOCTYPE html> <html> <body> <!-- replace the text below with your name!-->    <!-- -->   ...
<!DOCTYPE html> <html> <body> <!-- replace the text below with your name!-->    <!-- -->    <!-- -->    <title> name </title> <script> // // Write a function that calculates the amount of money a person would earn over // a period of years if his or her salary is one penny the first day, two pennies // the second day, and continues to double each day. The program should ask the // user for the number of years and...
Question Block elements v.s. inline elements. <!DOCTYPE html> <html> <head> <style>     body{                      text-
Question Block elements v.s. inline elements. <!DOCTYPE html> <html> <head> <style>     body{                      text-align: center;     }     .textdiv {        background-color: LightSlateGrey;        width: 50%;     }     .imgdiv {                      background-color: PapayaWhip;                   width: 30%;     } </style> </head> <body>     <h2>Center Me</h2>     <p>"Neque porro quisquam est qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit..."</p>     <div class="textdiv">                   Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt...
Utilizing PHP and HTML code Create a form that has text inputs for two numbers and...
Utilizing PHP and HTML code Create a form that has text inputs for two numbers and a submit button. Submit the values to a program that calculates and displays the GCD of the two numbers. The greatest common divisor of two integers a and b is the largest integer that is a factor of both a and b. The GCD of any number and 1 is 1, and the GCD of any number and 0 is that number. For example:...
<!doctype html> <html lang="en">   <head>     <title>Programming 1</title>     <meta charset="utf-8"/>           
<!doctype html> <html lang="en">   <head>     <title>Programming 1</title>     <meta charset="utf-8"/>                     </head>      <body>     <script type="text/javascript">              function findAnswer() {           var a = new Date(2020, 12, 29);           // HINT: Be careful with getMonth()           var d =  a.getFullYear() + a.getMonth();           var sum = d % 5;           document.getElementById("ans").innerHTML = sum.toString();         }     </script>              <form action="#" method="post" name="form1" id="form1" class="form" >        <input type="button" name="Submit" id="submit" value="Submit" onclick="findAnswer();"/>          </form>     <p id ="ans"></p>   </body> </html> none Will the code from above print anything, if so, what printed ?...
<!doctype html> <html lang="en">   <head>     <title>Programming 1</title>     <meta charset="utf-8"/>           
<!doctype html> <html lang="en">   <head>     <title>Programming 1</title>     <meta charset="utf-8"/>                     </head>      <body>     <script type="text/javascript">              function findAnswer() {           var a = document.getElementById("box1").value;           var b = document.getElementById("box2").value;                        if (typeof(a) == "number" && typeof(b) == "number") {               var c = (a + b) % 5;               document.getElementById("ans").innerHTML = c.toString();             } else {                document.getElementById("ans").innerHTML = "no Good";             }         }     </script>              <form action="#" method="post" name="form1" id="form1" class="form" >        <label>Enter Numbers: </label> <br />           <label> Value 1  : </label><input type="text" name="box1" id="box1"  value="10" /><br/>           <label> Value...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT