I have downloaded a template with bootstrap in which there is a FORM type part that consists of the following:
<div class="share-desc">
<div class="share">
<p>Number of units :</p><input type="number" class="text_box" type="text" value="1" min="1" />
</div>
<div class="button"><span><a href="#">Add to Cart</a></span></div>
<div class="clear"></div>
</div>
To send the selected values and the product data I tried to do this:
<from action="carro/prueb1.php" method="POST">
<div class="share-desc">
<div class="share">
<p>Numero de Unidades :</p><input type="number" class="text_box" type="text" value="1" min="1" id="num" />
</div>
<div class="button" type="submit" name="btn"><span><a>Añadir al Carro</a></span></div>
<div class="clear"></div>
</div>
</from>
At the moment in PHP I have this:
<?php
include('../Conector');
$conexion=conectar('bbdd');
//extract($_REQUEST);
session_start();
if ( !isset($_SESSION['btn'])){
echo "<h2> Mensaje </h2>";
}else{
$uni=$_POST['num'];
echo "<h2>".$uni."</h2>";
}
?>
I want to alter the code of the bootstrap template as little as possible, but at the same time I need the values sent to work for me, something that I have not achieved at the moment. I have worked little with bootstrap, hence my question
What should I do to pass the values to PHP?