/    Sign up×
Community /Pin to ProfileBookmark

Multiple Cookies and retention

I have been designing a website that requires registration for a course (NO shopping cart). The logic goes like this:
1. course list (select) — i have <inputs hidden> for each part (i.e. course id, name, cost, etc…)
2. –> cookie.php — pg that stores the course list info then redirects to
3. registration form (submit) — so you put all information (non pmt)
4. –> cookie.php — pg that stores the form information then redirects to
5. mailpg.php — pg that now pulls all the $_cookie[] information and submits the formmail then redirects to
6. paypalpg.php — pg that now pulls all the $_
cookie[] information and submits to the Paypal.com pg so the info is pulled up by Paypal
7. Successful redirect to a thank you pg on the website OR.
8. Cancel redirect to course list page.

— My problem is that it seems to store all the information, HOWEVER, it loses ONLY the item_name & item_number EVERYTIME i get to step #5. But if it is a cookie and im storing it — why would it NOT hold JUST those 2? Obviously it would just not store any correct?

I have NO clue where my issue is.

setcookie(“item_number”, $_POST[‘item_number’], time()+3600);
— i am calling it on step 5 as:
<input type=”hidden” name=”item_number” value=”<?= $HTTP_COOKIE_VARS[‘item_number’]; ?>” />
— and if i use a sub page just to echo all my stored cookies (which ALL work, except the item_name & item_number).

Please help as all the searches have led me NO WHERE.

Anthony

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @Aceman 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 6.16,
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: @nearjob,
tipped: article
amount: 1000 SATS,

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

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...