Need help getting this shopping cart to work

I’m currently using this scripts from

I want to take the javascript off and just have a add button that will work the same way but I can’t figure out how I can do this. Also When I copy the code and paste into my products page and hit add to cart the page doesn’t head to shoppingcart.php page. It just adds command=addproductid=1 to the current page url

Thank you for any help!