Problem with session order number on email receipt
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