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

Willie Allison
Willie Allison
2,035 Points

How do I create a identifier to submit to process.php without it posting in the browser?

I have to add a HTML element that will allow the Process.php file to show the order number without the order number showing in the browser. I am not sure where to start. The last few videos were about paypal accounts and this come up out of the blue.

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">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="submit" value="Update Order">

    </form>


</body>
</html>

1 Answer

Erik McClintock
Erik McClintock
45,783 Points

Willie,

If you recall, there is an HTML input of type "hidden" that you can add to your forms that will be physically present and thus you are able to interact with it in various ways (for example, submitting an order number [for this instance], and for baiting spam robots into filling out the hidden input when they try to submit [this is a popular form of spam-prevention called using a "honeypot"), but it will not be visible to the user on the front end of the site.

Hopefully this hint will point you in the right direction!

Erik

Willie Allison
Willie Allison
2,035 Points

Thank you Erik. That helps.