Forums
This topic is locked
PHP cookie retention (or lack there of)
Posted 22 Aug 2006 07:40:11
1
has voted
22 Aug 2006 07:40:11 Anthony Curatola III posted:
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