Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Build a Simple PHP Application Integrating with PayPal HTML Forms

Need help on final question

Im not sure if I have to call a key from the array but definitely the name attribute s incorrect. Can you please help?

form.html
<!DOCTYPE html>
<html>
<head>
    <title>Ye Olde Ice Cream Shoppe</title>
</head>
<body>

    <p>Your order has been created. What flavor of ice cream would you like to add to it?</p>

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

        <label for="flavor" name="flavor">Flavor</label>
        <select id="flavor" name="flavor">
            <option value="">&#8212; Select &#8212;</option>
            <option value="Vanilla">Vanilla</option>
            <option value="Chocolate">Chocolate</option>
            <option value="Strawberry">Strawberry</option>
            <option value="Cookie Dough">Cookie Dough</option>
        </select>
 <input type="hidden" name='<?php $_POST["order_id"] ?>' value="order-id">
        <input type="submit" value="Update Order">


    </form>

</body>
</html>

1 Answer

In future if you post a question, just saying what is wrong or help me.. isn't the correct way to ask question it gives people no information.. I had to go to the quiz and go through the process to see where it was going wrong..

In any case

<input type="hidden" name='<?php $_POST["order_id"] ?>' value="order-id">

is wrong... you just have to switch name= & value=..