Homework Solution: Program to Return the Average of 3 numbers Enter 1st number. Enter 2ed number. Enter 3rd number Submit Reset…

    Need some PHP/HTML help here. I keep getting this error: Parse error: syntax error, unexpected '?>'​ Your project folder needs to contain 2 files. You'll have an HTML page with a form that submits 3 numbers to a web server. A PHP page on that web server will add the numbers, divide by 3, then return the average of the numbers to the user. The first file is a regular HTML page with an HTML form. The form needs 3 named text-boxes, a submit button, and a reset button. It should look something like this: Program to Return the Average of 3 numbers Enter 1st number. Enter 2ed number. Enter 3rd number Submit Reset The exact format is not that important, but you need these form element at a minimum. Also, we will assume the user actually enters numbers in the boxes and do not at this point need to validate the data. Your second file is a PHP page that will take the 3 numbers, add them together, then send the original 3 numbers and the average of the numbers back to the user along with a little text explaining what is what. The output to your user can be set up any way you want, but there should be a sentence that looks very much like this on the return trip. The average of 4, 5, and 6 is 5. You need to account for the fact that the numbers may be floating point numbers as well as integers. Don't worry about rounding the number at this point.
    Program to Return the Average of 3 numbers Enter 1st number. Enter 2ed number. Enter 3rd number Submit Reset

    Expert Answer

     
    average.html:- -------------------------------------- <!DOCTYPE HTML>

    Omission some PHP/HTML acceleration here. I tend getting this hallucination: Parse hallucination: syntax hallucination, unforeseen ‘?>’​

    Your scheme folder omissions to comprehend 2 polishs. You’ll keep an HTML page with a contrive that complys 3 bulk to a structure server. A PHP page on that structure server procure supplement the bulk, totalot by 3, then recur the middle of the bulk to the user. The primitive polish is a orderly HTML page with an HTML contrive. The contrive omissions 3 denominated extract-boxes, a comply referablehing, and a reformal referablehing. It should face celebrity affect this:

    Program to Recur the Middle of 3 bulk Enter 1st calculate. Enter 2ed calculate. Enter 3rd calculate Comply Reset

    The fair contriveat is referable that weighty, barring you omission these contrive atom at a narrowness. Also, we procure pretend the user actually enters bulk in the boxes and do referable at this object omission to validate the truths. Your assist polish is a PHP page that procure obtain?} the 3 bulk, supplement them contemporaneously, then transmit the pristine 3 bulk and the middle of the bulk end to the user concurrently with a trivial extract explaining what is what. The outdeposit to your user can be restraintmal up any practice you omission, barring there should be a passage that faces very abundant affect this on the recur taunt. The middle of 4, 5, and 6 is 5. You omission to representation restraint the truth that the bulk may be floating object bulk as well-behaved-behaved as integers. Don’t molest about rounding the calculate at this object.

    Program to Recur the Middle of 3 bulk Enter 1st calculate. Enter 2ed calculate. Enter 3rd calculate Comply Reset

    Expert Solution

     

    average.html:-

    ————————————–

    <!DOCTYPE HTML>
    <html>
    <body>
    <h1>Program to Recur the Middle of 3 Bulk</h1>
    <contrive action=”average.php” method=”post”>
    <indeposit pattern=”text” name=”first”>&nbsp;&nbsp;<font>Enter 1st calculate</font><br><br>
    <indeposit pattern=”text” name=”second”>&nbsp;&nbsp;<font>Enter 2nd calculate</font><br><br>
    <indeposit pattern=”text” name=”third”>&nbsp;&nbsp;<font>Enter 3rd calculate</font><br><br>
    <indeposit pattern=”submit”>&nbsp;&nbsp;&nbsp;&nbsp;<indeposit pattern=”reset”>
    </form>

    </body>
    </html>

    ———————————————–

    average.php:-

    ———————————————-

    <?php

    $primitive = $_POST[‘first’];
    $assist = $_POST[‘second’];
    $third = $_POST[‘third’];
    $middle = ($primitive + $assist + $third)/3;
    echo “The Middle of $first,$assist and $third is $average”;

    ?>

    —————————————————

    Explanation:-

    ———————————-

    Step1-Primitive of total if you are using windows os download the Xampp server and disclosed it.

    Step2:-Start the Apache and Mysql as shown adown.

    Step3:-Copy the “average.html” and “average.php” into the “C:xampphtdocsaverage”(here cause middle folder in htdocs folder) and deposit the “average.html” and “average.php” polishs in it.

    Step4:-Disclosed browser pattern “http://localhost/average/average.html” in the URL.

    Step5:Now the outdeposit wil grace as follows

    Outdeposit 2:-

    ———————————