There may be a problem with the setting of the session variable that holds the id of the last inserted record. To check on this go into your product detail page and go to line 431, this is the line that should say <h1>Product Details</h1>. In this line just before the </h1> add in this code:
<br/>The id for the last inserted product is: <?php echo $_SESSION['WADA_Insert_Products'] ?>
This will let you know if the id was set properly, to confirm the result go into your products table in your db and look for the id you see, it should be for the item you just inserted.