Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

- create two php scripts named \"list.php\" and \"detail.php\". - The \"list.php

ID: 3906559 • Letter: #

Question

- create two php scripts named "list.php" and "detail.php".

- The "list.php" will create a list of fruit names. Each item on the list is a link. When clicking on a link, the "detail.php" will be excuted which will generate the name and price of that fruit.

- A sample is below:

? ? è 127.0.0·1/395/2%20Variables/exerise/a.php Fruit Information Our store has the following fruits for sale. Click each link for detail Apple .Organe Peach . Banana Pear Mango . Grape ? ? D 127.0.0 . 1/395/2%20Variables/exerise/b.php?name =%20pear&price-96202.5; Fruit Information What you have selected is: pear The price of the pear is: 2.5

Explanation / Answer

list.php

<html>
<head>
    <title>List Fruits</title>
    <style type = "text/css">
       body{
           color: #037EE2;
       }
    </style>
</head>
<body>
    <h2>Fruit Information</h2>
    <h3>Our Store has the following fruits for sale. Click each link for detail.</h3>
    <ul>
        <li><a href="detail.php?name=Apple&amp;price=4.5">Apple</a></li>
        <li><a href="detail.php?name=Orange&amp;price=6.5">Orange</a></li>
        <li><a href="detail.php?name=Peach&amp;price=2.5">Peach</a></li>
        <li><a href="detail.php?name=Banana&amp;price=8.5">Banana</a></li>
        <li><a href="detail.php?name=Pear&amp;price=6.5">Pear</a></li>
        <li><a href="detail.php?name=Mango&amp;price=6.5">Mango</a></li>
        <li><a href="detail.php?name=Grape&amp;price=4.5">Grape</a></li>
    </ul>
</body>
</html>

detail.php

<html>
<head>
    <title>Fruit Detail</title>
    <style type = "text/css">
       body{
           color: #037EE2;
       }
    </style>
</head>
<body>
    <?php
      $name = $_REQUEST["name"];
      $price = $_REQUEST["price"];
    
      echo "What you have selected is: ".$name;
      echo " The price of the ".$name." is: ".$price;
    ?>
</body>
</html>