I have textbox , i want to retrive the value from the textbox and store it in a php variable . Its not inside a form tag. I am creating a e-commerce website for my class assignment . I retrive each product and display it in the website. I have a quantity text box and a "add to cart button". The value in the cart need to be added to the database
while($row_pro =mysqli_fetch_array($row_mysql) )
{
$product_id=$row_pro['productID'];
$product_name =$row_pro['productName'];
$product_desc= $row_pro['productDesc'];
$product_price= $row_pro['price'];
$product_vendor=$row_pro['Vendor'];
$product_images=$row_pro['image'];
echo "<a href='detail.php?productID=$product_id'><h3>$product_name</h3></a>
<a href='detail.php?productID=$product_id'><img src='images/$product_images' width='180px' height='280px'/></a>
<p>$product_desc</p>
<p>$product_vendor</p>
<h4>$product_price</h4>
<input type='text' name='quantity'>
<a href='product_display.php?addtocart=$product_id'><button style=\"float:right\">Add to cart</button></a>
";
}