Thank you for your quick reply, basically I want the customer to be able to click add to cart to purchase the item,Then on the cart page click the checkout button, then enter the necessary billing info on the checkout out page then it will take them to the confirm page to make sure info the imputed is correct. Then if everything goes well they will receive a sales receipt via email and on the order has been authorized page there will be a download link to download the product and when they click that, the download box should open up to save the download. And if the download box doesn't open then it will take them to the actual download page (download.php).
And this is for the other question
Order Details Table (ecart store details in database)
details_ID left bank (primary key with auto increment)
first_name
last_name
details_orderID <?php echo ((isset($_SESSION["eCart1_OrderID"]))?$_SESSION["eCart1_OrderID"]:""); ?>
details_productID
details_productname
detail_productdesc
detail_quantity
detail_price
timestamp
details_downloads
street1
zip
Orders table ( ecart store summary in database)
orderID left bank (primary key with auto increment)
first_name
last_name
orderReferenceID <?php echo session_id(); ?>
ordervisitorID
ordertotal
orderdate
orderaddress
orderzip
City
State
My database is set up with NO foreign keys and both of those tables have primary keys.