Sending data from html to database
<p>The following partial code is a mix of HTML and python. Where a products' values (<code>item_name, description, item_price</code>) of the table <code>products</code> from my database are laid out on HTML and has a "add to cart" input button next to each item.</p>

<pre><code>{% for product in products %}
    &lt;li&gt;

        &lt;b&gt;Name/Model:&lt;/b&gt; {{ product['item_name'] }}&lt;br&gt; &lt;b&gt;Description:&lt;/b&gt; {{ product['description'] }}&lt;br&gt; &lt;b&gt;Price: &lt;/b&gt; {{ product['item_price'] }}$

        &lt;input type="submit" value="Add to cart"/&gt;

    &lt;/li&gt; 
{% endfor %}
</code></pre>

<p>When add to cart is pressed, is there a way to send the information of the product next to that button to my other table called item_cart? </p>

<p>I'm very very new to this kind of mixed language projects, if you need extra code to help you help solve my problem ask in the comments and i will share the part of code you need.</p>

<p>Yes you can, you just need to create a view to do it.</p>

<p>Your view will have a parameter that will take <code>product.product_id</code>, like so:</p>

<pre><code>def addToCart(request, product_id):
    p = Product.objects.filter(product_id = product_id)
    #put the product in your member's cart table,
</code></pre>

<p>Then in your template, your "add to cart" input button will call:</p>

<pre><code>"/addToCart/{{ product.product_id }}/"
</code></pre>

<p>I hope this gives you some direction.</p>

python django django-forms