/    Sign up×
Community /Pin to ProfileBookmark

I have a PHP ordering form. Once the user has input the data, it takes
them to a confirmation screen. Right now it will list all the items on
the page, regardless of whether they’ve ordered it or not.

There will be over twenty items on the order page, but I only want the
items that have been ordered to appear on the confirm page, otherwise
it looks unprofessional. How can I accomplish this?

I’ve included a link to the page:

[url]http://www.energykitchen.com/mealplan2.php[/url]

Please note that only the first three items are active.

Thank you.

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@NightShift58Feb 15.2007 — You need only display those whose $_POST values are <> 0.
Copy linkTweet thisAlerts:
@skyflyer6000authorFeb 15.2007 — How do I do that?
Copy linkTweet thisAlerts:
@NightShift58Feb 15.2007 — Let's take one field as example, turkey_be:[code=php]<?php
if (isset($_POST['turkey_be']) AND intval($_POST['turkey_be']) > 0) {
echo "Turkey Burger & Egg: " . $_POST['turkey_be'];
}
?>[/code]
×

Success!

Help @skyflyer6000 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...