I am having trouble retrieving the numeric input and assign it to the variable q. I managed to do so with the variale l and p.
<?php
$sql = "SELECT * FROM produit";
$result = mysqli_query($conn, $sql);
while($row = mysqli_fetch_assoc($result)){
?>
<div class="prod<?php echo $row['ID_produit']?>">
<img src="images/<?php echo $row['image']?>" alt="image">
<h3><?php echo $row['nom_produit']?></h3>
<h3>Prix:<?php echo $row['prix']?>€</h6>
<form action="" method="post">
<label name="qte">QTE:</label>
<input type="number"><br><br>
<a href="panier.php?action=ajout&l=<?php echo $row['nom_produit']?>& q= <?php echo $_POST['qte'];&p=<?php echo $row['prix']?>" onclick="window.open(this.href, '',
'toolbar=no, location=no, directories=no, status=yes, scrollbars=yes, resizable=yes, copyhistory=no, width=600, height=350'); return false;">
GOGOGO </a>
</form>
</div>
<?php
}
?>
</div>