I want to fill a vector with data by keyboard but with the condition that a single text box is the one that passes me the data and enters it into the vector, can you give me some idea and / or solution, there is no error I just want It stores more than one piece of information.
<link rel="stylesheet" href="CSS/principal.css" type="text/css">
<?php
$link = mysqli_connect("localhost","root","");
mysqli_select_db($link,"db1") or die ("Error al conectar a la base de Datos");
?>
<html>
<body>
<table border="1">
<tr>
<th>Nombre<th/>
<th>Precio<th/>
<tr/>
<?php
$query=("SELECT * FROM tal1");
$resultado= $link->query($query);
while($row=mysqli_fetch_array($resultado)){
?>
<tr>
<td><?php echo $row['nombre']?><td/>
<td><?php echo $row['precio']?><td/>
<tr/>
<?php
}
?>
<table/>
<br/>
<form action="pago.php" method="get">
<input name="precio[]" class="form-input" type"text" id="numero"
placeholder="cantidad de productos" >
<input name="precio[]" class="form-input" type="radio" value="15">
<br/><br/>
<input type="submit" name="mostrar[]" value="calcular">
<form/>
<body/>
<html/>
second code
<?php
$link = mysqli_connect("localhost","root","");
mysqli_select_db($link,"db1") or die ("Error al conectar a la base de Datos");
if ( !empty($_GET["precio"]) && is_array($_GET["precio"]) ) {
echo "<ul>";
foreach ( $_GET["precio"] as $como ) {
echo "<li>";
echo $como;
echo "</li>";
}
echo "</ul>";
}
?>