PDA

View Full Version : Problem with session order number on email receipt


Phil137
03-15-2009, 09:21 PM
I have been working on this session error for a while. I looked around the forms to see if anyone else posted a similar incident but no luck so far.

When running through the checkout process I have a session ID for the order number saved in a database and posted on the success page of my site. Unfortunately, the session order number will not show up in an email receipt unless the order on the confirmation page is submitted twice within the same session.

I am working with MySQL and PHP. I have no trouble receiving other session IDs (from the shopping cart) in the email confirmation receipt. Below is the non-apparent session.

<?php echo ((isset($_SESSION["ShoppingCart_OrderID"]))?$_SESSION["ShoppingCart_OrderID"]:"") ?>

If you have any ideas I will really appreciate them. Thanks in advance

Phil

Ray Borduin
03-16-2009, 07:43 AM
It sounds like maybe the email takes place before the insert... Move the email code lower on the page.

Phil137
03-16-2009, 07:34 PM
Thank you Ray, I tried lowering the code and everything works great! I really appreciate the information.