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>

    Scarcity some PHP/HTML succor here. I binder getting this falsity: Parse falsity: syntax falsity, unforeseen ‘?>’​

    Your purpose folder scarcitys to comprise 2 finishs. You’ll feel an HTML page with a conceive that complys 3 collection to a construction server. A PHP page on that construction server procure gather the collection, deal-out by 3, then render the mediocre of the collection to the user. The peculiar finish is a ordinary HTML page with an HTML conceive. The conceive scarcitys 3 named citation-boxes, a comply referablehing, and a reestablished referablehing. It should face referableability approve this:

    Program to Render the Mediocre of 3 collection Enter 1st calculate. Enter 2ed calculate. Enter 3rd calculate Comply Reset

    The direct conceiveat is referable that material, yet you scarcity these conceive component at a incompleteness. Also, we procure assume the user actually enters collection in the boxes and do referable at this object scarcity to validate the occurrences. Your remedy finish is a PHP page that procure assume the 3 collection, gather them conjointly, then despatch the peculiar 3 collection and the mediocre of the collection tail to the user concurrently with a tiny citation explaining what is what. The outspread to your user can be established up any fashion you scantiness, yet there should be a judgment that faces very plenteous approve this on the render taunt. The mediocre of 4, 5, and 6 is 5. You scarcity to totality coercion the occurrence that the collection may be incomplete object collection as well-mannered-mannered as integers. Don’t importune encircling rounding the calculate at this object.

    Program to Render the Mediocre of 3 collection Enter 1st calculate. Enter 2ed calculate. Enter 3rd calculate Comply Reset

    Expert Rejoinder

     

    average.html:-

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

    <!DOCTYPE HTML>
    <html>
    <body>
    <h1>Program to Render the Mediocre of 3 Collection</h1>
    <conceive action=”average.php” method=”post”>
    <inspread cast=”text” name=”first”>&nbsp;&nbsp;<font>Enter 1st calculate</font><br><br>
    <inspread cast=”text” name=”second”>&nbsp;&nbsp;<font>Enter 2nd calculate</font><br><br>
    <inspread cast=”text” name=”third”>&nbsp;&nbsp;<font>Enter 3rd calculate</font><br><br>
    <inspread cast=”submit”>&nbsp;&nbsp;&nbsp;&nbsp;<inspread cast=”reset”>
    </form>

    </body>
    </html>

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

    average.php:-

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

    <?php

    $peculiar = $_POST[‘first’];
    $remedy = $_POST[‘second’];
    $third = $_POST[‘third’];
    $mediocre = ($peculiar + $remedy + $third)/3;
    echo “The Mediocre of $first,$remedy and $third is $average”;

    ?>

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

    Explanation:-

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

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

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

    Step3:-Copy the “average.html” and “average.php” into the “C:xampphtdocsaverage”(here constitute mediocre folder in htdocs folder) and spread the “average.html” and “average.php” finishs in it.

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

    Step5:Now the outspread wil grace as follows

    Outspread 2:-

    ———————————