what i did was take itemdetails2.php
as i don't have your tables and connections, i changed the bits i needed to change so that the page would work with my data.
i don't even remember putting the cursor anywhere particular, but the 'add to cart button' wizard, placed the form at the bottom of the content div